public interface ObjectBooleanPair<K> extends Pair<K,java.lang.Boolean>
Pair
; provides some additional methods that use polymorphism to avoid (un)boxing.Modifier and Type | Method and Description |
---|---|
static <K> java.util.Comparator<ObjectBooleanPair<K>> |
lexComparator()
Returns a lexicographical comparator for pairs.
|
static <K> ObjectBooleanPair<K> |
of(K left,
boolean right)
Returns a new type-specific immutable
Pair with given left and right value. |
default java.lang.Boolean |
right()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectBooleanPair<K> |
right(boolean r)
Sets the right element of this pair (optional operation).
|
default ObjectBooleanPair<K> |
right(java.lang.Boolean l)
Deprecated.
Please use the corresponding type-specific method instead.
|
boolean |
rightBoolean()
Returns the right element of this pair.
|
default java.lang.Boolean |
second()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectBooleanPair<K> |
second(boolean r)
Sets the right element of this pair (optional operation).
|
default ObjectBooleanPair<K> |
second(java.lang.Boolean l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
secondBoolean()
Returns the right element of this pair.
|
default java.lang.Boolean |
value()
Deprecated.
Please use the corresponding type-specific method instead.
|
default ObjectBooleanPair<K> |
value(boolean r)
Sets the right element of this pair (optional operation).
|
default ObjectBooleanPair<K> |
value(java.lang.Boolean l)
Deprecated.
Please use the corresponding type-specific method instead.
|
default boolean |
valueBoolean()
Returns the right element of this pair.
|
boolean rightBoolean()
@Deprecated default java.lang.Boolean right()
default ObjectBooleanPair<K> right(boolean r)
r
- a new value for the right element.UnsupportedOperationException
.@Deprecated default ObjectBooleanPair<K> right(java.lang.Boolean l)
default boolean secondBoolean()
right()
.@Deprecated default java.lang.Boolean second()
default ObjectBooleanPair<K> second(boolean r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ObjectBooleanPair<K> second(java.lang.Boolean l)
default boolean valueBoolean()
right()
.@Deprecated default java.lang.Boolean value()
default ObjectBooleanPair<K> value(boolean r)
r
- a new value for the right element.Pair.right(Object)
.@Deprecated default ObjectBooleanPair<K> value(java.lang.Boolean l)
static <K> ObjectBooleanPair<K> of(K left, boolean right)
Pair
with given left and right value.static <K> java.util.Comparator<ObjectBooleanPair<K>> lexComparator()
The comparator returned by this method implements lexicographical order. It compares first the left elements: if the result of the comparison is nonzero, it returns said result. Otherwise, this comparator returns the result of the comparison of the right elements.
lexComparator
in interface Pair<K,java.lang.Boolean>