|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.multiarray.ConcreteIndexMap.ZZMap
An Map of int by int key. (Z is the math symbol for integers). A Map maps keys to values. A Map cannot contain duplicate keys; each key can map to at most one value. For this implementation, the keys are restricted to non-negative integers, and we only use non-negative integers as values.
A ZZMap is like a readonly 1-d array of int.
The size() method returns the array length.
The get(int ii) method returns the int stored at
position ii;
This class also supports a functional composition framework via the setPrev() method. The implementation of get(int) and size() provided here is simply the identity composed with whatever. Subclasses will override this functionality.
| Constructor Summary | |
protected |
ConcreteIndexMap.ZZMap()
|
protected |
ConcreteIndexMap.ZZMap(ConcreteIndexMap.ZZMap prev)
Construct a ZZMap form the functional composition of the new Map with another. |
| Method Summary | |
(package private) int |
get(int key)
Returns the value to which this Map maps the specified key. |
(package private) void |
rebind(int[] range)
Rebind (redefine) the range of get(int) |
(package private) void |
setPrev(ConcreteIndexMap.ZZMap prev)
Form the functional composition of this Map with another. |
(package private) int |
size()
Returns the number of key-value mappings in this Map. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
protected ConcreteIndexMap.ZZMap()
protected ConcreteIndexMap.ZZMap(ConcreteIndexMap.ZZMap prev)
prev - ZZMap this is composed with.| Method Detail |
int get(int key)
key - int
final void rebind(int[] range)
range - int array which defines the get(int)
member.int size()
final void setPrev(ConcreteIndexMap.ZZMap prev)
prev - ZZMap this is composed with.public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||