Iterator that selects only objects of a certain type from the underlying available ones. The
"lazy" denomination is due to the fact that selection occurs only when hasNext() is called
| Modifier and Type | Field and Description |
|---|---|
| protected boolean | |
| protected T | |
| private final Class | |
| private final Iterator |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Class | |
| public Iterator | |
| public boolean | |
| public static < Type if iterated element T> Iterator | Returns: AnIterator whose next() call selects only values matching the specific typeNote the matching values are not pre-calculated (hence the "lazy" denomination)
- i.e., the match is performed only when The source values - ignored if values, Class<T> nullThe (never @code null) type of values to select - any value whose type is assignable to this type
will be selected by the iterator. type)
|
| public T | |
| public String |
| finished | back to summary |
|---|---|
| protected boolean finished | |
| nextValue | back to summary |
|---|---|
| protected T nextValue | |
| type | back to summary |
|---|---|
| private final Class<T> type | |
| values | back to summary |
|---|---|
| private final Iterator<?> values | |
| LazyMatchingTypeIterator | back to summary |
|---|---|
| public LazyMatchingTypeIterator(Iterator<?> values, Class<T> type) | |
| getType | back to summary |
|---|---|
| public Class | |
| getValues | back to summary |
|---|---|
| public Iterator | |
| hasNext | back to summary |
|---|---|
| public boolean hasNext() Implements java. Doc from java. Returns
| |
| lazySelectMatchingTypes | back to summary |
|---|---|
public static <T> Iterator
| |
| next | back to summary |
|---|---|
| public T next() Implements java. Doc from java. Returns the next element in the iteration.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |