cz.cuni.amis.utils
Class NKey

java.lang.Object
  extended by cz.cuni.amis.utils.NKey
Direct Known Subclasses:
NKeyCommutative

public class NKey
extends java.lang.Object

N-argument key - used to store multiple keys within one object to provide n-argument key for maps.

The keys are not commutative! If you need to have commutativity for key's parameters use NKeyCommutative.


Constructor Summary
protected NKey()
          Should be used by descendants together with init()
  NKey(java.lang.Object... keys)
           
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 int getCount()
           
 java.lang.Object getKey(int index)
           
 int hashCode()
           
protected  void init(java.lang.Object[] keys)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NKey

protected NKey()
Should be used by descendants together with init()


NKey

public NKey(java.lang.Object... keys)
Method Detail

init

protected void init(java.lang.Object[] keys)

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

getCount

public int getCount()

getKey

public java.lang.Object getKey(int index)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object