Package org.teiid.query.sql.lang
Class CollectionValueIterator
- java.lang.Object
-
- org.teiid.query.sql.lang.CollectionValueIterator
-
- All Implemented Interfaces:
ValueIterator
public class CollectionValueIterator extends Object implements ValueIterator
-
-
Constructor Summary
Constructors Constructor Description CollectionValueIterator(Collection vals)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
hasNext()
Returns true if the iteration has more values.Object
next()
Returns the next Expression or Object value in the interation.void
reset()
Optional reset method - allows a single instance of a ValueIterator implementation to be resettable, such that the next call tonext
returns the first element in the iteration (if any).
-
-
-
Constructor Detail
-
CollectionValueIterator
public CollectionValueIterator(Collection vals)
-
-
Method Detail
-
hasNext
public boolean hasNext() throws TeiidComponentException
Description copied from interface:ValueIterator
Returns true if the iteration has more values. (In other words, returns true if next would return a value rather than throwing an exception.)- Specified by:
hasNext
in interfaceValueIterator
- Returns:
- true if this ValueIterator has more values.
- Throws:
TeiidComponentException
- indicating a non business- related Exception such as a service or bean being unavailable, or a communication failure.- Since:
- 4.3
- See Also:
ValueIterator.hasNext()
-
next
public Object next() throws TeiidComponentException
Description copied from interface:ValueIterator
Returns the next Expression or Object value in the interation.- Specified by:
next
in interfaceValueIterator
- Returns:
- the next Expression or Object value in the iteration.
- Throws:
TeiidComponentException
- indicating a non business- related Exception such as a service or bean being unavailable, or a communication failure.- Since:
- 4.3
- See Also:
ValueIterator.next()
-
reset
public void reset()
Description copied from interface:ValueIterator
Optional reset method - allows a single instance of a ValueIterator implementation to be resettable, such that the next call tonext
returns the first element in the iteration (if any). This method should be able to be called at any point during the lifecycle of a ValueIterator instance.- Specified by:
reset
in interfaceValueIterator
- Since:
- 4.3
- See Also:
ValueIterator.reset()
-
-