|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectrcf.core.util.groups.ImmutableSingleton<A>
rcf.core.util.groups.ImmutablePair<rcf.core.util.collection.iterator.ImmutableFixedUniIterable<A>,rcf.core.util.collection.iterator.ImmutableFixedUniIterable<B>>
rcf.core.util.groups.ImmutablePair.Iterable<A,B>
A - The type of the first entry in each pair.B - The type of the second entry in each pair.public static class ImmutablePair.Iterable<A,B>
TODO: Javadoc Binds a pair of immutable iterable objects, allowing them to be iterated in tandem.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class rcf.core.util.groups.ImmutablePair |
|---|
ImmutablePair.Accessor<A,B>, ImmutablePair.Iterable<A,B>, ImmutablePair.Iterator<A,B> |
| Field Summary |
|---|
| Fields inherited from class rcf.core.util.groups.ImmutablePair |
|---|
b |
| Fields inherited from class rcf.core.util.groups.ImmutableSingleton |
|---|
a |
| Constructor Summary | |
|---|---|
ImmutablePair.Iterable(rcf.core.util.collection.iterator.ImmutableFixedUniIterable<A> _a,
rcf.core.util.collection.iterator.ImmutableFixedUniIterable<B> _b)
TODO: Javadoc Create an immutable iterable pair from two immutable iterable objects. |
|
| Method Summary | |
|---|---|
boolean |
isCompatible(ImmutablePosition<Pair<A,B>> p)
TODO: Javadoc Determine if the specified position is compatible to, i.e. |
boolean |
isEmpty()
TODO: Javadoc Return true if this iterable contains no elements. |
boolean |
isNative(ImmutablePosition<Pair<A,B>> p)
TODO: Javadoc Determine if the specified position is native to, i.e. |
ImmutablePair.Iterator<A,B> |
makeNative(ImmutablePosition<Pair<A,B>> p)
TODO: Javadoc Convert the specified position into an iterator native to this iterable. |
ImmutablePair.Iterator<A,B> |
post()
|
ImmutablePair.Iterator<A,B> |
pre()
|
ImmutablePair.Iterator<A,B> |
project(rcf.core.util.collection.position.ImmutableFixedUniPosition<Pair<A,B>> p)
|
int |
size()
TODO: Javadoc Return the number of elements which this iterable contains. |
| Methods inherited from class rcf.core.util.groups.ImmutablePair |
|---|
equals, getA, getB, hashCode, toString |
| Methods inherited from class rcf.core.util.groups.ImmutableSingleton |
|---|
get |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface rcf.core.util.groups.ImmutableSingletonInterface |
|---|
get |
| Constructor Detail |
|---|
public ImmutablePair.Iterable(rcf.core.util.collection.iterator.ImmutableFixedUniIterable<A> _a,
rcf.core.util.collection.iterator.ImmutableFixedUniIterable<B> _b)
_a - The A type iterable object._b - The B type iterable object.| Method Detail |
|---|
public boolean isCompatible(ImmutablePosition<Pair<A,B>> p)
ImmutableIterabletrue for
pre- and post-sentinel positions). This method should never throw
exceptions as it is a test to avoid them.
Note that this method will return true even for positions
which did not original come from this iterable, for example in the case
of an
ImmutableFixedUniIterator
over a
ImmutableCollection.subCollection(rcf.core.util.collection.position.ImmutableFixedUniPosition, rcf.core.util.filter.Filter).
To test if the specified position is native to this iterable, rather
than just compatible with it, use the
ImmutableIterable.isNative(ImmutablePosition) method.
isCompatible in interface ImmutableIterable<Pair<A,B>>p - The position to determine if this iterable is compatible with.
true indicates that the specified position
is compatible with this iterable, and its iterators and methods.public boolean isEmpty()
ImmutableIterabletrue if this iterable contains no elements.
isEmpty in interface ImmutableIterable<Pair<A,B>>true if this iterable contains no elements.public boolean isNative(ImmutablePosition<Pair<A,B>> p)
ImmutableIterabletrue for pre- and post-sentinel positions). This
method should never throw exceptions as it is a test to avoid
them.
Note that this method will return false for positions
which did not original come from this iterable, for example in the case
of an
ImmutableFixedUniIterator
over a
ImmutableCollection.subCollection(rcf.core.util.collection.position.ImmutableFixedUniPosition, rcf.core.util.filter.Filter).
The positions may still be used as arguments to most methods both
on this iterable and the ImmutableIterators it creates, but
they are not native to it, and may behave differently under
iteration. To test if the specified position is compatible with
this iterable and its iterators, rather than native to it, use the
ImmutableIterable.isCompatible(ImmutablePosition) method.
isNative in interface ImmutableIterable<Pair<A,B>>p - The position to determine if this iterable is native to.
true indicates that the specified position
is native to this iterable.public ImmutablePair.Iterator<A,B> makeNative(ImmutablePosition<Pair<A,B>> p)
ImmutableIterableImmutableIterator.copy() will be returned.
makeNative in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterable<Pair<A,B>>makeNative in interface ImmutableIterable<Pair<A,B>>p - The position to return a native version of.
p if it is native to this
iterable, or, if isCompatible(p) a
position q such that q.equals(p)
&& isNative(q) && (q != p). Otherwise, if
!isCompatible(p), this method will
return null.public ImmutablePair.Iterator<A,B> post()
post in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterable<Pair<A,B>>public ImmutablePair.Iterator<A,B> pre()
pre in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterable<Pair<A,B>>public ImmutablePair.Iterator<A,B> project(rcf.core.util.collection.position.ImmutableFixedUniPosition<Pair<A,B>> p)
project in interface rcf.core.util.collection.iterator.ImmutableFixedUniIterable<Pair<A,B>>public int size()
ImmutableIterable
size in interface ImmutableIterable<Pair<A,B>>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||