Top Description Fields Constructors Methods
com.jogamp.gluegen.jcpp

public Class SourceIterator

extends Object
implements Iterator<Token>
Class Inheritance
All Implemented Interfaces
java.util.Iterator
Imports
java.io.IOException, java.util.Iterator, .NoSuchElementException

An Iterator for Sources, returning Tokens.

Field Summary

Modifier and TypeField and Description
private final Source
private Token

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
advance()

Rethrows IOException inside IllegalStateException.

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the enclosed Source has more tokens.
public Token
next()

Implements java.util.Iterator.next.

Returns the next token from the enclosed Source.
public void
remove()

Overrides default java.util.Iterator.remove.

Not supported.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sourceback to summary
private final Source source
tokback to summary
private Token tok

Constructor Detail

SourceIteratorback to summary
public SourceIterator(Source s)

Method Detail

advanceback to summary
private void advance()

Rethrows IOException inside IllegalStateException.

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the enclosed Source has more tokens. The EOF token is never returned by the iterator.

Returns:boolean

Doc from java.util.Iterator.hasNext.

true if the iteration has more elements

Exceptions
IllegalStateException:
if the Source throws a LexerException or IOException
nextback to summary
public Token next()

Implements java.util.Iterator.next.

Returns the next token from the enclosed Source. The EOF token is never returned by the iterator.

Returns:Token

Doc from java.util.Iterator.next.

the next element in the iteration

Exceptions
IllegalStateException:
if the Source throws a LexerException or IOException
removeback to summary
public void remove()

Overrides default java.util.Iterator.remove.

Not supported.

Exceptions
UnsupportedOperationException:

Doc from java.util.Iterator.remove.

if the remove operation is not supported by this iterator