Class Array<T>

  • Type Parameters:
    T - Value key type
    All Implemented Interfaces:
    Iterable<T>, Collection<T>, List<T>

    @Immutable
    @Loggable(1)
    public final class Array<T>
    extends Object
    implements List<T>
    Array as an object.

    This class is truly immutable. This means that it never changes its encapsulated values and is annotated with @Immutable annotation.

    Limitation: Encapsulated objects with exposed mutators can mutate their state.

    Since:
    0.1
    Suppressed Checkstyle violations:
    MissingDeprecatedCheck (430 lines)
    • Constructor Detail

      • Array

        public Array()
        Public ctor, for an zero-length empty array.
      • Array

        public Array​(T... list)
        Public ctor, from an array of values.
        Parameters:
        list - Items to encapsulate
      • Array

        public Array​(Iterable<T> list)
        Public ctor.
        Parameters:
        list - Items to encapsulate
        Since:
        0.12
      • Array

        public Array​(Array<T> array)
        Public ctor, from a generic array.
        Parameters:
        array - Array with items to encapsulate
      • Array

        public Array​(Collection<T> collection)
        Public ctor, from a generic collection.
        Parameters:
        collection - Collection with items to encapsulate