Module openj9.dtfj

Class IntegerArray

  • All Implemented Interfaces:
    SortListener, Serializable

    public final class IntegerArray
    extends PrimitiveArray
    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:
    Dave Griffiths home page, Serialized Form
    • Constructor Detail

      • IntegerArray

        public IntegerArray​(int shift)
      • IntegerArray

        public IntegerArray()
      • IntegerArray

        public IntegerArray​(int length,
                            int value)
    • Method Detail

      • 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()