Klasse ObjectObjectMutablePair<T,V>

java.lang.Object
speiger.src.collections.objects.misc.pairs.impl.ObjectObjectMutablePair<T,V>
Typparameter:
T - the keyType of elements maintained by this Collection
V - the keyType of elements maintained by this Collection
Alle implementierten Schnittstellen:
ObjectObjectPair<T,V>

public class ObjectObjectMutablePair<T,V> extends Object implements ObjectObjectPair<T,V>
Mutable Pair Implementation that
  • Konstruktordetails

    • ObjectObjectMutablePair

      public ObjectObjectMutablePair()
      Default Constructor
    • ObjectObjectMutablePair

      public ObjectObjectMutablePair(T key, V value)
      Key/Value Constructur
      Parameter:
      key - the key of the Pair
      value - the value of the Pair
  • Methodendetails

    • setKey

      public ObjectObjectPair<T,V> setKey(T key)
      Beschreibung aus Schnittstelle kopiert: ObjectObjectPair
      Sets the Key of the Pair.
      Angegeben von:
      setKey in Schnittstelle ObjectObjectPair<T,V>
      Parameter:
      key - the key that should be set.
      Gibt zurück:
      self or a new Pair instance with the new key.
    • getKey

      public T getKey()
      Angegeben von:
      getKey in Schnittstelle ObjectObjectPair<T,V>
      Gibt zurück:
      the Key of the Pair
    • setValue

      public ObjectObjectPair<T,V> setValue(V value)
      Beschreibung aus Schnittstelle kopiert: ObjectObjectPair
      Sets the Value of the Pair.
      Angegeben von:
      setValue in Schnittstelle ObjectObjectPair<T,V>
      Parameter:
      value - the value that should be set.
      Gibt zurück:
      self or a new Pair instance with the new value.
    • getValue

      public V getValue()
      Angegeben von:
      getValue in Schnittstelle ObjectObjectPair<T,V>
      Gibt zurück:
      the Value of the Pair
    • set

      public ObjectObjectPair<T,V> set(T key, V value)
      Beschreibung aus Schnittstelle kopiert: ObjectObjectPair
      Sets key and value of the Pair
      Angegeben von:
      set in Schnittstelle ObjectObjectPair<T,V>
      Parameter:
      key - the key that should be set.
      value - the value that should be set.
      Gibt zurück:
      self or a new Pair instance with the new key and value.
    • shallowCopy

      public ObjectObjectPair<T,V> shallowCopy()
      Beschreibung aus Schnittstelle kopiert: ObjectObjectPair
      Clones the Pair if it is mutable.
      Angegeben von:
      shallowCopy in Schnittstelle ObjectObjectPair<T,V>
      Gibt zurück:
      a New Mutable Instance if it is mutable
    • equals

      public boolean equals(Object obj)
      Setzt außer Kraft:
      equals in Klasse Object
    • hashCode

      public int hashCode()
      Setzt außer Kraft:
      hashCode in Klasse Object
    • toString

      public String toString()
      Setzt außer Kraft:
      toString in Klasse Object