org.objectweb.speedo.usercache.lib
Class UserCacheKey

java.lang.Object
  extended byorg.objectweb.speedo.usercache.lib.UserCacheKey

public class UserCacheKey
extends java.lang.Object

Defines a key of an user cache. Several elements can compose the key. The comparaison (equals and hashCode) are based on the key elements.

Author:
S.Chassande-Barrioz

Constructor Summary
UserCacheKey(int size)
           
UserCacheKey(java.lang.Object[] elements)
           
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares to an UserCacheKey instance.
 int hashCode()
           
 void setPart(int index, java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserCacheKey

public UserCacheKey(int size)

UserCacheKey

public UserCacheKey(java.lang.Object[] elements)
Method Detail

setPart

public void setPart(int index,
                    java.lang.Object o)

hashCode

public int hashCode()
Returns:
the hashCode of the first element

equals

public boolean equals(java.lang.Object o)
Compares to an UserCacheKey instance.

See Also:
Object.equals(java.lang.Object)