Class IntegerArray
java.lang.Object
com.ibm.j9ddr.corereaders.tdump.zebedee.util.PrimitiveArray
com.ibm.j9ddr.corereaders.tdump.zebedee.util.IntegerArray
- All Implemented Interfaces:
SortListener
,Serializable
Useful utility class that just implements an array of integers that can be sorted. One
main use is for mapping integer addresses to objects without the huge overhead of a Hashtable. The
key to the usefulness is in the SortListener object that gets sorted along with this object.
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(int value) void
add
(int index, int value) clone()
Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.int
get
(int index) int
void
put
(int index, int value) void
putAll
(int value) int[]
toArray()
Methods declared in class com.ibm.j9ddr.corereaders.tdump.zebedee.util.PrimitiveArray
indexOf, indexOf, nearestIndexOf, reverseSort, reverseSort, setSize, size, sort, sort, sort, sort, swap
-
Constructor Details
-
IntegerArray
public IntegerArray(int shift) -
IntegerArray
public IntegerArray() -
IntegerArray
public IntegerArray(int length, int value)
-
-
Method Details
-
clone
Description copied from class:java.lang.Object
Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.Classes which wish to support cloning must specify that they implement the Cloneable interface, since the native implementation checks for this.
-
toArray
public int[] toArray() -
add
public void add(int value) -
get
public int get(int index) -
put
public void put(int index, int value) -
add
public void add(int index, int value) -
putAll
public void putAll(int value) -
memoryUsage
public int memoryUsage()
-