|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcf.core.util.groups.Triple.Iterator<A,B,C>
A - The type of the first entry in each triple.B - The type of the second entry in each triple.C - The type of the third entry in each triple.public static class Triple.Iterator<A,B,C>
TODO: Javadoc Binds a triple of iterators, allowing them to be iterated simultaneously.
| Field Summary | |
|---|---|
protected Triple<A,B,C> |
curr
TODO: Javadoc The current triple created from the wrapped iterators. |
protected Triple.Iterable<A,B,C> |
iterable
TODO: Javadoc |
protected rcf.core.util.collection.iterator.FixedUniIterator<A> |
x
TODO: Javadoc The first iterator which is being wrapped. |
protected rcf.core.util.collection.iterator.FixedUniIterator<B> |
y
TODO: Javadoc The second iterator which is being wrapped. |
protected rcf.core.util.collection.iterator.FixedUniIterator<C> |
z
TODO: Javadoc The third iterator which is being wrapped. |
| Constructor Summary | |
|---|---|
Triple.Iterator(Triple.Iterable<A,B,C> _iterable,
rcf.core.util.collection.iterator.FixedUniIterator<A> _a,
rcf.core.util.collection.iterator.FixedUniIterator<B> _b,
rcf.core.util.collection.iterator.FixedUniIterator<C> _c)
TODO: Javadoc Create an iterator triple from three iterator objects. |
|
| Method Summary | |
|---|---|
rcf.core.util.collection.position.ImmutableFixedUniPosition<Triple<A,B,C>> |
asAbstract()
|
Triple.Iterator<A,B,C> |
copy()
TODO: Javadoc Return a new iterator which is currently at the same position as this iterator. |
boolean |
equals(Object o)
Determine if the specified object is an instance of ImmutablPposition which represents the same position in the
same abstract data structure, as this object. |
Triple<A,B,C> |
get()
TODO: Javadoc Get the content element of this singleton. |
int |
hashCode()
|
boolean |
isCompatible(ImmutablePosition<Triple<A,B,C>> p)
Determine if this position is compatible to, i.e. |
boolean |
isPost()
|
boolean |
isPre()
|
boolean |
isRemoved()
Determine if this position has been removed from the backing abstract data structure. |
boolean |
isSentinel()
Determine if this position is a sentinel; i.e. |
boolean |
isValid()
Determine if there has been a concurrent modification to the backing abstract data structure. |
Triple.Iterable<A,B,C> |
iterable()
TODO: Javadoc |
Triple.Iterator<A,B,C> |
next(rcf.core.util.filter.Filter<Triple<A,B,C>> filter)
|
Triple<A,B,C> |
remove()
Remove this position, and the element associated with it from the backing abstract data structure, and return the element. |
Triple<A,B,C> |
set(Triple<A,B,C> a)
TODO: Javadoc Set the content element of this singleton. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Triple<A,B,C> curr
protected final Triple.Iterable<A,B,C> iterable
protected final rcf.core.util.collection.iterator.FixedUniIterator<A> x
protected final rcf.core.util.collection.iterator.FixedUniIterator<B> y
protected final rcf.core.util.collection.iterator.FixedUniIterator<C> z
| Constructor Detail |
|---|
public Triple.Iterator(Triple.Iterable<A,B,C> _iterable,
rcf.core.util.collection.iterator.FixedUniIterator<A> _a,
rcf.core.util.collection.iterator.FixedUniIterator<B> _b,
rcf.core.util.collection.iterator.FixedUniIterator<C> _c)
_iterable - _a - The A type iterator object._b - The B type iterator object._c - The C type iterator object.| Method Detail |
|---|
public rcf.core.util.collection.position.ImmutableFixedUniPosition<Triple<A,B,C>> asAbstract()
asAbstract in interface rcf.core.util.collection.position.ImmutableFixedUniPosition<Triple<A,B,C>>public Triple.Iterator<A,B,C> copy()
ImmutableIteratorthis iterator. That is, this method will return an iterator
i such that this.equals(i) && this.isCompatible(i)
(notice that equals is symmetric but isCompatible is not). Note that a call to
e.g. ImmutableFixedUniIterator.next(rcf.core.util.filter.Filter)
on this must not affect i and vice-versa.This method is extremely useful in conjunction with position based collections where iteration is expensive or positions have algorithmic importance or higher level semantics.
copy in interface rcf.core.util.collection.iterator.FixedUniIterator<Triple<A,B,C>>copy in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterator<Triple<A,B,C>>copy in interface rcf.core.util.Copyablecopy in interface ImmutableIterator<Triple<A,B,C>>copy in interface Iterator<Triple<A,B,C>>i such that
this.equals(i).public boolean equals(Object o)
ImmutablePositionImmutablPposition which represents the same position in the
same abstract data structure, as this object. Notice that for positions
p and q, p.equals(q) implies
p.isCompatible(q) && q.isCompatible(p).
equals in interface ImmutablePosition<Triple<A,B,C>>equals in class Objecto - The object to compare this one to, for equality.
true if this position and the one specified
represent the same position, in the same abstract data structure.public Triple<A,B,C> get()
ImmutableSingletonInterface
get in interface ImmutableSingletonInterface<Triple<A,B,C>>public int hashCode()
hashCode in class Objectpublic boolean isCompatible(ImmutablePosition<Triple<A,B,C>> p)
ImmutablePositiontrue even for sentinel positions). This method should never
throw exceptions (especially IncompatiblePositionException) as it
is a test to avoid them.
isCompatible in interface ImmutablePosition<Triple<A,B,C>>p - The position to determine if this one is compatible to.
true indicates that this position and the specified
one belong to the same abstract data structure.public boolean isPost()
isPost in interface rcf.core.util.collection.position.ImmutableFixedUniPosition<Triple<A,B,C>>public boolean isPre()
isPre in interface rcf.core.util.collection.position.ImmutableFixedUniPosition<Triple<A,B,C>>public boolean isRemoved()
Position
isRemoved in interface Position<Triple<A,B,C>>true if this position has been removed from the
backing abstract data structure.public boolean isSentinel()
ImmutablePosition
isSentinel in interface ImmutablePosition<Triple<A,B,C>>true if this is a sentinel position.public boolean isValid()
Positionfalse in
all cases where any method may throw a
ConcurrentModificationException.
isValid in interface Position<Triple<A,B,C>>true indicates that this position is still valid
(though it may have been removed, see Position.isRemoved()) in the
backing abstract data structure. This also indicates that no
method on this object will throw a
ConcurrentModificationException at the time of this call.public Triple.Iterable<A,B,C> iterable()
ImmutableIterator
iterable in interface rcf.core.util.collection.iterator.FixedUniIterator<Triple<A,B,C>>iterable in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterator<Triple<A,B,C>>iterable in interface ImmutableIterator<Triple<A,B,C>>public Triple.Iterator<A,B,C> next(rcf.core.util.filter.Filter<Triple<A,B,C>> filter)
next in interface rcf.core.util.collection.iterator.FixedUniIterator<Triple<A,B,C>>next in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterator<Triple<A,B,C>>public Triple<A,B,C> remove()
Position
remove in interface Position<Triple<A,B,C>>ImmutableSingletonInterface.get()public Triple<A,B,C> set(Triple<A,B,C> a)
SingletonInterface
set in interface SingletonInterface<Triple<A,B,C>>set in interface Position<Triple<A,B,C>>a - The new content element of this singleton.
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||