|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.acorn.lang.ArrayKey
public class ArrayKey
A class for using one-dimensional arrays as map keys.
| Constructor Summary | |
|---|---|
ArrayKey(Object[] a)
Constructs a new key. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
int |
compareTo(Object other)
|
boolean |
equals(int index,
ArrayKey key)
Checks whether the given key equals this one starting from the specified array index. |
boolean |
equals(Object o)
|
Object |
get(int index)
Gets the indexed element. |
int |
hashCode()
|
int |
length()
Returns the length of the array. |
void |
set(int index,
Object o)
Sets the indexed element. |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArrayKey(Object[] a)
a - the array.| Method Detail |
|---|
public int hashCode()
hashCode in class Objectpublic boolean equals(Object o)
equals in class Objectpublic int compareTo(Object other)
compareTo in interface Comparablepublic Object clone()
clone in class Object
public boolean equals(int index,
ArrayKey key)
index - they starting index.key - the key to compare.
public Object get(int index)
index - the index.
NullPointerException - if the array is null.
ArrayIndexOutOfBoundsException - for an invalid index.
public void set(int index,
Object o)
index - the index.o - the element.
NullPointerException - if the array is null.
ArrayIndexOutOfBoundsException - for an invalid index.public int length()
NullPointerException - if the array is null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||