public class MultiKey extends Object
| Constructor and Description |
|---|
MultiKey(Comparable[] values)
Creates an multi key for an array of
Comparable. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o)
Returns true if another object equals this key.
|
Object[] |
getValues()
Returns the values in this key
|
int |
hashCode()
Returns the hash code of this key.
|
String |
toString()
Returns a string representing this key.
|
void |
update(int index,
Comparable value)
Updates the value at a specified index with a new value
|
void |
updateHash()
Updates the hash code if this index
|
public MultiKey(Comparable[] values)
Comparable.values - key valuespublic void update(int index,
Comparable value)
index - index of valuevalue - new valuepublic void updateHash()
public boolean equals(Object o)
public Object[] getValues()
public String toString()
Copyright © 2017. All rights reserved.