Class IntegerSequence

  • All Implemented Interfaces:
    Sequence

    public final class IntegerSequence
    extends Object
    implements Sequence
    An Sequence wrapper for an array of integers.
    • Constructor Detail

      • IntegerSequence

        public IntegerSequence​(int[] seq)
      • IntegerSequence

        public IntegerSequence​(int[] seq,
                               int start,
                               int length)
    • Method Detail

      • size

        public int size()
        Description copied from interface: Sequence
        Returns the number of elements in the sequence.
        Specified by:
        size in interface Sequence
      • objectAt

        public int objectAt​(int i)
        Description copied from interface: Sequence
        Returns a unique integer code for object at index i (the first element has 0 index).
        Specified by:
        objectAt in interface Sequence