Class Pair<K,V>
java.lang.Object
lu.kbra.pclib.datastructure.tuple.Pair<K,V>
- All Implemented Interfaces:
Cloneable,DeepCloneable,Tuple
- Direct Known Subclasses:
ReadOnlyPair
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionObject[]asArray()clone()intboolean<T> Tget(int i) getKey()getValue()inthashCode()booleanhasKey()booleanhasValue()<T> Tmap(BiFunction<K, V, T> func) <T,N> Pair<T, N> map(BiFunction<K, V, T> funcKey, BiFunction<K, V, N> funcValue) mapKey(BiFunction<K, V, T> func) mapValue(BiFunction<K, V, T> func) toString()Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface lu.kbra.pclib.datastructure.DeepCloneable
deepClone
-
Field Details
-
key
-
value
-
-
Constructor Details
-
Pair
public Pair() -
Pair
-
-
Method Details
-
asArray
-
clone
- Specified by:
clonein interfaceDeepCloneable- Overrides:
clonein classObject
-
elementCount
public int elementCount()- Specified by:
elementCountin interfaceTuple
-
equals
-
get
public <T> T get(int i) -
getKey
-
getValue
-
hashCode
public int hashCode() -
hasKey
public boolean hasKey() -
hasValue
public boolean hasValue() -
map
-
map
-
mapKey
-
mapValue
-
setKey
-
setValue
-
toString
-