|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.plt.iter.AbstractIterable<T>
edu.rice.cs.plt.iter.FilteredIterable<T>
public class FilteredIterable<T>
An Iterable containing all the values in the provided Iterable for which the provided
Predicate holds. Because the size cannot be determined without traversing the list,
does not implement SizedIterable.
| Constructor Summary | |
|---|---|
FilteredIterable(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
|
|
| Method Summary | ||
|---|---|---|
int |
compositeHeight()
Get the maximum path length from this node to a leaf. |
|
int |
compositeSize()
Get the number of nodes in the tree rooted at this node. |
|
FilteredIterator<T> |
iterator()
|
|
static
|
make(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
Call the constructor (allows T to be inferred) |
|
static
|
makeSnapshot(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
Create a FilteredIterable and wrap it in a SnapshotIterable, forcing
immediate evaluation of the filter. |
|
| Methods inherited from class edu.rice.cs.plt.iter.AbstractIterable |
|---|
equals, hashCode, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FilteredIterable(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
| Method Detail |
|---|
public FilteredIterator<T> iterator()
iterator in interface java.lang.Iterable<T>public int compositeHeight()
Composite
compositeHeight in interface Compositepublic int compositeSize()
Composite
compositeSize in interface Composite
public static <T> FilteredIterable<T> make(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
T to be inferred)
public static <T> SnapshotIterable<T> makeSnapshot(java.lang.Iterable<? extends T> iterable,
Predicate<? super T> predicate)
FilteredIterable and wrap it in a SnapshotIterable, forcing
immediate evaluation of the filter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||