public final class BooleanPair extends java.lang.Object implements java.io.Serializable, BooleanIndexable
This is similar to Pair, but for raw boolean values.
As these values are defined final, this class is also immutable.
BooleanIndexable.Base, BooleanIndexable.EntryConsumer| Modifier and Type | Field and Description |
|---|---|
boolean |
first
The first value of this pair.
|
boolean |
second
The second value of this pair.
|
EMPTY, SINGLE_FALSE, SINGLE_TRUEEMPTY_BOOLEAN_ITERATOR| Constructor and Description |
|---|
BooleanPair(boolean first,
boolean second)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
applyAsBooleans(BooleanFunction2<T> function)
Apply a 2-boolean function on this pair.
|
boolean |
equals(java.lang.Object o) |
boolean |
get(int index)
Get the element at the given index.
|
int |
hashCode() |
boolean |
operate(BooleanOperator2 operator)
Call an 2-boolean operator on this pair.
|
int |
size()
Get the size.
|
boolean |
test(BooleanPredicate2 predicate)
Call a 2-boolean predicate on this pair.
|
java.lang.String |
toString() |
Tuple2<java.lang.Boolean,java.lang.Boolean> |
toTuple()
Convert this into a tuple.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAllTo, addToArray, addToArray, asBase, asCollection, asIndexable, asList, booleanIterator, booleanIterator, compare, emptyIndexable, equal, equal, firstMatch, foldLeft, forEachBoolEntry, frozen, getMod, gyt, hash, headSet, indexes, init, initByIndex, intIndexes, isEmpty, iterator, lastMatch, listIterator, nextMatch, previousMatch, reverse, rotated, singleton, subSet, sybSet, tailSet, toArray, toList, toString, view, viewArray, viewArray, viewArray, viewByIndex, viewIndexable, viewIndexable, viewIndexable, viewList, viewList, viewList, withAppendedValue, withCachedHash, withExchangedValueAt, withInsertedValueAt, withRemovedValueAt, withSwappedValuesAtand, containsBool, containsFalse, containsTrue, forEachBool, forEachBooleanFragile, forEachBoolFragile, or, xorpublic final boolean first
public final boolean second
public BooleanPair(boolean first,
boolean second)
first - first value of pairsecond - second value of pairpublic int size()
Sizeablepublic boolean get(int index)
BooleanIndexableget in interface BooleanIndexableindex - index between 0 and size() - 1public <T> T applyAsBooleans(@NotNull BooleanFunction2<T> function)
public boolean operate(@NotNull BooleanOperator2 operator)
public boolean test(@NotNull BooleanPredicate2 predicate)
@NotNull public Tuple2<java.lang.Boolean,java.lang.Boolean> toTuple()
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object@NotNull public java.lang.String toString()
toString in class java.lang.Object