org.crsh.cmdline.matcher.tokenizer
Class Tokenizer

java.lang.Object
  extended by org.crsh.cmdline.matcher.tokenizer.Tokenizer
All Implemented Interfaces:
Iterator<Token>

public class Tokenizer
extends Object
implements Iterator<Token>

Author:
Julien Viet

Field Summary
private  Delimiter delimiter
          .
private  int index
          .
private  int ptr
          .
private  CharSequence s
          .
private  ArrayList<Token> stack
          .
 
Constructor Summary
Tokenizer(CharSequence s)
           
 
Method Summary
 Delimiter getDelimiter()
           
 int getIndex()
           
 boolean hasNext()
           
 Token next()
           
private  Token parse()
           
 Token peek()
           
 void pushBack()
           
 void pushBack(int count)
           
 void remove()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s

private final CharSequence s
.


index

private int index
.


stack

private ArrayList<Token> stack
.


ptr

private int ptr
.


delimiter

private Delimiter delimiter
.

Constructor Detail

Tokenizer

public Tokenizer(CharSequence s)
Method Detail

hasNext

public boolean hasNext()
Specified by:
hasNext in interface Iterator<Token>

parse

private Token parse()

next

public Token next()
Specified by:
next in interface Iterator<Token>

remove

public void remove()
Specified by:
remove in interface Iterator<Token>

getIndex

public int getIndex()

pushBack

public void pushBack()

pushBack

public void pushBack(int count)

peek

public Token peek()

getDelimiter

public Delimiter getDelimiter()


Copyright © 2012 eXo Platform SAS. All Rights Reserved.