Project Wonder 5.0

er.extensions.foundation
Class ERXMultiKey

java.lang.Object
  extended by er.extensions.foundation.ERXMultiKey

public class ERXMultiKey
extends java.lang.Object

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 Summary
ERXMultiKey()
          Constructs a multi-key.
ERXMultiKey(com.webobjects.foundation.NSArray keys)
          Constructs a multi-key for a given array.
ERXMultiKey(java.lang.Object[] keys)
          Constructs a multi-key for a given object array.
ERXMultiKey(java.util.Vector keys)
          Constructs a multi-key for a given vector.
 
Method Summary
 boolean equals(java.lang.Object o)
          Method used to compare two ERXMultiKeys.
 int hashCode()
          Calculates a unique hash code for the given array of keys.
 java.lang.Object[] keys()
          Method used to return the object array of keys for the current multi-key.
DO NOT MODIFY!
 void recomputeHashCode()
          Recomputes the hash code if you ever changes the keys array directly
 java.lang.String toString()
          String representation of the multi-key.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ERXMultiKey

public ERXMultiKey()
Constructs a multi-key.


ERXMultiKey

public ERXMultiKey(java.lang.Object[] keys)
Constructs a multi-key for a given object array.

Parameters:
keys - object array

ERXMultiKey

public ERXMultiKey(com.webobjects.foundation.NSArray keys)
Constructs a multi-key for a given array.

Parameters:
keys - array of keys

ERXMultiKey

public ERXMultiKey(java.util.Vector keys)
Constructs a multi-key for a given vector.

Parameters:
keys - vector of keys
Method Detail

keys

public final java.lang.Object[] keys()
Method used to return the object array of keys for the current multi-key.
DO NOT MODIFY!

Returns:
object array of keys

hashCode

public final int hashCode()
Calculates a unique hash code for the given array of keys.

Overrides:
hashCode in class java.lang.Object
Returns:
unique hash code for the array of keys.

recomputeHashCode

public final void recomputeHashCode()
Recomputes the hash code if you ever changes the keys array directly


equals

public final boolean equals(java.lang.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.

Overrides:
equals in class java.lang.Object
Parameters:
o - object to be compared
Returns:
result of comparison

toString

public java.lang.String toString()
String representation of the multi-key.

Overrides:
toString in class java.lang.Object
Returns:
string representation of key.

Last updated: Tue, Feb 21, 2017 • 05:45 PM CET

Copyright © 2002 – 2007 Project Wonder.