Class Tuple<K,V>
- java.lang.Object
-
- org.apache.directory.api.ldap.model.cursor.Tuple<K,V>
-
- Type Parameters:
K
- The key type for the TupleV
- The associated Value type
public class Tuple<K,V> extends Object
A key/value tuple for simple two column persistent Tables with sorted keys.- Author:
- Apache Directory Project
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
K
getKey()
Gets the key for this Tuple.V
getValue()
Gets the value for this Tuple.int
hashCode()
Tuple<K,V>
setBoth(K key, V value)
Sets both the key and the value for this Tuple in one call and returns this Tuple object.Tuple<K,V>
setBoth(Tuple<K,V> tupleToCopy)
Sets both the key and the value for this Tuple in one call and returns this Tuple object.Tuple<K,V>
setKey(K key)
Sets the key for this Tuple.Tuple<K,V>
setValue(V value)
Sets the value for this Tuple.String
toString()
-
-
-
Method Detail
-
setKey
public Tuple<K,V> setKey(K key)
Sets the key for this Tuple.- Parameters:
key
- the new key to set- Returns:
- this Tuple itself to set and return
-
setValue
public Tuple<K,V> setValue(V value)
Sets the value for this Tuple.- Parameters:
value
- the new value to set- Returns:
- this Tuple itself to set and return
-
setBoth
public Tuple<K,V> setBoth(K key, V value)
Sets both the key and the value for this Tuple in one call and returns this Tuple object. This is useful for setting the tuples key and value then returning it.- Parameters:
key
- the new key to setvalue
- the new value to set- Returns:
- this Tuple itself to set and return
-
setBoth
public Tuple<K,V> setBoth(Tuple<K,V> tupleToCopy)
Sets both the key and the value for this Tuple in one call and returns this Tuple object. This is useful for setting the tuples key and value then returning it.- Parameters:
tupleToCopy
- the tuple to copy- Returns:
- this Tuple itself to set and return
-
-