Class ImmutableArray

java.lang.Object
ortus.boxlang.runtime.types.Array
ortus.boxlang.runtime.types.immutable.ImmutableArray
All Implemented Interfaces:
Serializable, Iterable<Object>, Collection<Object>, List<Object>, SequencedCollection<Object>, IReferenceable, IImmutable, IType, IListenable

public class ImmutableArray extends Array implements IImmutable
Represents an immutable Array. All data you want needs to be passed in the constructor or provided to a static creation method. Once instantiated, the Array cannot be modified. An exception will be thrown if you invoke any mutator method.
See Also:
  • Constructor Details

    • ImmutableArray

      public ImmutableArray()
      Constructor to create default array
    • ImmutableArray

      public ImmutableArray(int initialCapactity)
      Constructor to create array with an initial capacity
      Parameters:
      initialCapactity - The initialCapactity of Array to create
    • ImmutableArray

      public ImmutableArray(Object[] arr)
      Constructor to create a Array from a Java array
      Parameters:
      arr - The array to create the Array from
    • ImmutableArray

      public ImmutableArray(List<? extends Object> list)
      Constructor to create a Array from a List
      Parameters:
      list - The List to create the Array from
  • Method Details