saffron.runtime
Class HashableArray

java.lang.Object
  |
  +--saffron.runtime.HashableArray

public class HashableArray
extends Object

HashableArray provides a Object[] with a hashCode() and an equals(java.lang.Object) function, so it can be used as a key in a Hashtable.


Field Summary
(package private)  Object[] a
           
 
Constructor Summary
HashableArray(Object[] a)
           
 
Method Summary
(package private) static int arrayHashCode(Object[] a)
           
(package private) static boolean arraysAreEqual(Object[] a1, Object[] a2)
          Return whether two arrays are equal (shallow compare).
 boolean equals(Object o)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

a

Object[] a
Constructor Detail

HashableArray

public HashableArray(Object[] a)
Method Detail

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object o)
Overrides:
equals in class Object

arrayHashCode

static int arrayHashCode(Object[] a)

arraysAreEqual

static boolean arraysAreEqual(Object[] a1,
                              Object[] a2)
Return whether two arrays are equal (shallow compare).


SourceForge.net_Logo