Class Tuple<K,V>

java.lang.Object
org.deltava.util.Tuple<K,V>
Type Parameters:
K - the first value type
V - the second value type
All Implemented Interfaces:
Serializable, Cacheable

public class Tuple<K,V> extends Object implements Cacheable
A utility class to create a tuple.
Since:
6.0
Version:
7.2
Author:
Luke
See Also:
  • Method Details

    • getLeft

      public K getLeft()
    • getRight

      public V getRight()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • create

      public static final <K,V> Tuple<K,V> create(K k, V v)
    • cacheKey

      public Object cacheKey()
      Description copied from interface: Cacheable
      Returns the cache key for this object. Caches call this method when adding the object.
      Specified by:
      cacheKey in interface Cacheable
      Returns:
      the cache key for the object