Package org.smallmind.nutsnbolts.util
Class Tuple<K,V>
- java.lang.Object
-
- org.smallmind.nutsnbolts.util.Tuple<K,V>
-
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Pair<K,V>>
public class Tuple<K,V> extends Object implements Serializable, Cloneable, Iterable<Pair<K,V>>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Tuple()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Tuple<K,V> tuple)voidaddPair(int index, K key, V value)voidaddPair(K key, V value)Map<K,List<V>>asMap()voidclear()Objectclone()booleancontainsKey(K key)booleancontainsKeyValuePair(K key, V value)KgetKey(int index)List<K>getKeys()Set<K>getUniqueKeys()VgetValue(int index)VgetValue(K key)List<V>getValues(K key)intindexOfKey(K key)Iterator<Pair<K,V>>iterator()voidremoveKey(K key)VremovePair(int index)VremovePair(K key)voidsetPair(int index, K key, V value)voidsetPair(K key, V value)voidsetValue(int index, V value)voidsetValue(K key, V value)intsize()StringtoString()-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Method Detail
-
clear
public void clear()
-
removeKey
public void removeKey(K key)
-
removePair
public V removePair(int index)
-
setValue
public void setValue(int index, V value)
-
size
public int size()
-
getKey
public K getKey(int index)
-
indexOfKey
public int indexOfKey(K key)
-
getValue
public V getValue(int index)
-
containsKey
public boolean containsKey(K key)
-
-