ERXMultiKey Class Reference

List of all members.

Public Member Functions

final boolean equals (Object o)
 ERXMultiKey (Vector keys)
 ERXMultiKey (NSArray keys)
 ERXMultiKey (Object[] keys)
 ERXMultiKey ()
final int hashCode ()
final Object[] keys ()
final void recomputeHashCode ()
String toString ()

Private Member Functions

 ERXMultiKey (short keyCount)

Private Attributes

int _hashCode
short _keyCount
Object[] _keys


Detailed Description

Simple class to use multiple objects as a single key for a dictionary or HashMap. The goal of this class is to be very fast.

Constructor & Destructor Documentation

ERXMultiKey ( short  keyCount  )  [private]

Constructs a multi-key for a given number.

Parameters:
keyCount number of keys

ERXMultiKey (  ) 

Constructs a multi-key.

ERXMultiKey ( Object[]  keys  ) 

Constructs a multi-key for a given object array.

Parameters:
keys object array

ERXMultiKey ( NSArray  keys  ) 

Constructs a multi-key for a given array.

Parameters:
keys array of keys

ERXMultiKey ( Vector  keys  ) 

Constructs a multi-key for a given vector.

Parameters:
keys vector of keys


Member Function Documentation

final boolean equals ( Object  o  ) 

Method used to compare two ERXMultiKeys. A multi key is equal to another multi key if the number of keys are equal and all of the keys are either both null or equals.

Parameters:
o object to be compared
Returns:
result of comparison

final int hashCode (  ) 

Calculates a unique hash code for the given array of keys.

Returns:
unique hash code for the array of keys.

final Object [] keys (  ) 

Method used to return the object array of keys for the current multi-key.
DO NOT MODIFY!

Returns:
object array of keys

final void recomputeHashCode (  ) 

Recomputes the hash code if you ever changes the keys array directly

String toString (  ) 

String representation of the multi-key.

Returns:
string representation of key.


Member Data Documentation

int _hashCode [private]

short _keyCount [private]

caches the number of keys

Object [] _keys [private]

holds the object array of keys


The documentation for this class was generated from the following file:

Generated on Sat May 26 06:43:13 2012 for Project Wonder by  doxygen 1.5.8