Class LongArrayBackedList<E>

  • Type Parameters:
    E - The element type.
    All Implemented Interfaces:
    Iterable<E>, Collection<E>, List<E>, RandomAccess

    public abstract class LongArrayBackedList<E>
    extends AbstractList<E>
    implements RandomAccess
    Immutable list that is backed by a long[] and can have any element type. Sub-classes need to be defined and implement methods for creating element instances from a long value. These classes should not override any other methods to guarantee immutability.
    • Constructor Detail

      • LongArrayBackedList

        protected LongArrayBackedList​(long[] pArray)
        Create an instance backed by a given array. For efficiency, the array is not copied and should thus not be changed afterwards.