T - The type of objects to iterate.TIterator - The type of iterator that is filtered.public class FilterIter<T,TIterator extends IInpIter<T,TIterator>> extends java.lang.Object implements IInpIter<T,FilterIter<T,TIterator>>
| Constructor and Description |
|---|
FilterIter(FilterIter<T,TIterator> iter)
Constructs a new instance from another iterator.
|
FilterIter(TIterator first,
TIterator last,
IFunc1Arg<T,java.lang.Boolean> pred)
Constructs a filter iterator where first is either the first position
in the range [first, last) such that pred(first.Current) == true or
else first == last.
|
| Modifier and Type | Method and Description |
|---|---|
void |
Advance(int offset)
Adds an offset to an iterator.
|
void |
Advance(long offset)
Adds an offset to an iterator.
|
IteratorCategory |
Category()
Gets the iterator category.
|
FilterIter<T,TIterator> |
Copy()
Creates and returns a copy of the current instance.
|
T |
Current()
Returns the filtered value of the underlying iterator.
|
void |
Dispose()
Performs application-defined tasks associated with freeing, releasing,
or resetting system resources or other cleanup.
|
long |
Distance(FilterIter<T,TIterator> other)
Determines the number of increments between
this instance and a specified iterator.
|
boolean |
Equals(FilterIter<T,TIterator> other)
Tests whether this instance is equal to a specified
object.
|
boolean |
equals(java.lang.Object obj)
Tests whether this instance is equal to a specified
object.
|
int |
hashCode()
Returns the hash code for this instance.
|
void |
Increment()
Continues to increments the iterator until it is either
equal to last or pred(Current) == true.
|
void |
ResetBegin()
Used to implement the IInpIter ResetBegin method.
|
void |
ResetEnd()
Used to implement the IInpIter ResetEnd method.
|
public FilterIter(TIterator first, TIterator last, IFunc1Arg<T,java.lang.Boolean> pred)
first - An input iterator addressing the position
of the first element in the range to be filtered.last - An input iterator addressing the position
one past the final element in the range to be filtered.pred - The specified predicate.public FilterIter(FilterIter<T,TIterator> iter)
iter - The iterator to copy.public void Dispose()
Dispose in interface IDisposablepublic IteratorCategory Category()
public FilterIter<T,TIterator> Copy()
public T Current()
public void ResetBegin()
ResetBegin in interface IBaseIter<FilterIter<T,TIterator extends IInpIter<T,TIterator>>>public void ResetEnd()
public void Increment()
public void Advance(int offset)
public void Advance(long offset)
public long Distance(FilterIter<T,TIterator> other)
Distance in interface IBaseIter<FilterIter<T,TIterator extends IInpIter<T,TIterator>>>other - An iterator addressing the position
one past the final element in the range [this, other).InvalidOperationException - Thrown when the
argument iterator is invalid, or it is not reachable from the current
instance.public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - An object to compare with this instance.public int hashCode()
hashCode in class java.lang.Objectpublic boolean Equals(FilterIter<T,TIterator> other)
Equals in interface IEquatable<FilterIter<T,TIterator extends IInpIter<T,TIterator>>>other - An object to compare with this instance.Copyright© 2012 Progeneric Systems, Inc. All Rights Reserved.