|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectstructure.AbstractIterator
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(structure.List l)
Constructs a Reader that reads tokens from a List. |
|
Reader(Token t)
Constructs a Reader that reads from a single Token. |
|
| Method Summary | |
java.lang.Object |
get()
Not yet implemented. |
boolean |
hasNext()
Check for more tokens on input stream. |
static void |
main(java.lang.String[] args)
A sample method that reads tokens from a Reader and prints their value to the console. |
java.lang.Object |
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 structure.AbstractIterator |
hasMoreElements, 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(structure.List 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()
public java.lang.Object get()
public void reset()
public java.lang.Object next()
hasNext() returns the next token from the input
stream.
public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||