Package com.logicaldoc.util
Class Pair<K,V> 
java.lang.Object
com.logicaldoc.util.Pair<K,V> 
- Type Parameters:
- K- the type of key
- V- the type of value
A convenience class to represent name-value pairs.
- Since:
- 8.7
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Constructor Details- 
Pairpublic Pair()Creates a new pair
- 
PairCreates a new pair- Parameters:
- key- The key for this pair
- value- The value to use for this pair
 
 
- 
- 
Method Details- 
getKeyGets the key for this pair.- Returns:
- key for this pair
 
- 
getValueGets the value for this pair.- Returns:
- value for this pair
 
- 
toStringStringrepresentation of thisPair.The default name/value delimiter '=' is always used. 
- 
hashCodepublic int hashCode()Generate a hash code for this Pair.The hash code is calculated using both the name and the value of the Pair.
- 
equalsTest this Pairfor equality with anotherObject.If the Objectto be tested is not aPairor isnull, then this method returnsfalse.Two Pairs are considered equal if and only if both the names and values are equal.
- 
setKey
- 
setValue
 
-