|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectstructure5.AbstractIterator<Token>
Reader
public class Reader
A simple input stream that parses postscript files and generates
a stream of Tokens. By default, the stream is constructed
from a structure.ReadStream, but the Reader may also be constructed
to read from a List. This allows the recursive implementation of
procedures.
| Constructor Summary | |
|---|---|
Reader()
Constructs a Reader that reads from the default input stream. |
|
Reader(List<Token> l)
Constructs a Reader that reads tokens from a List. |
|
Reader(Token t)
Constructs a Reader that reads from a single Token. |
|
| Method Summary | |
|---|---|
Token |
get()
Not yet implemented. |
boolean |
hasNext()
Check for more tokens on input stream. |
static void |
main(String[] args)
A sample method that reads tokens from a Reader and prints their value to the console. |
Token |
next()
If hasNext() returns the next token from the input
stream. |
void |
reset()
If this is a list, resets the reader back to the beginning. |
| Methods inherited from class structure5.AbstractIterator |
|---|
hasMoreElements, iterator, nextElement, remove, value |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Reader()
public Reader(List<Token> l)
l - a List containing the tokens to be read.public Reader(Token t)
t - the source of the token stream| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<Token>hasNext in class AbstractIterator<Token>public Token get()
get in class AbstractIterator<Token>public void reset()
reset in class AbstractIterator<Token>public Token next()
hasNext() returns the next token from the input
stream.
next in interface Iterator<Token>next in class AbstractIterator<Token>public static void main(String[] args)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||