org.aksw.commons.util
Class Pair<K,V>

java.lang.Object
  extended by org.aksw.commons.util.Pair<K,V>
All Implemented Interfaces:
Map.Entry<K,V>

public class Pair<K,V>
extends Object
implements Map.Entry<K,V>

A pair class based on Map.Entry.

Author:
Claus Stadler

Constructor Summary
Pair(K key, V value)
           
 
Method Summary
static
<K,V> Pair<K,V>
create(K key, V value)
           
 boolean equals(Object obj)
           
 K getKey()
           
 V getValue()
           
 int hashCode()
           
 V setValue(V arg0)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Pair

public Pair(K key,
            V value)
Method Detail

create

public static <K,V> Pair<K,V> create(K key,
                                     V value)

getKey

public K getKey()
Specified by:
getKey in interface Map.Entry<K,V>

getValue

public V getValue()
Specified by:
getValue in interface Map.Entry<K,V>

toString

public String toString()
Overrides:
toString in class Object

setValue

public V setValue(V arg0)
Specified by:
setValue in interface Map.Entry<K,V>

hashCode

public int hashCode()
Specified by:
hashCode in interface Map.Entry<K,V>
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface Map.Entry<K,V>
Overrides:
equals in class Object


Copyright © 2012. All Rights Reserved.