Class ObjectArray<E>

  • All Implemented Interfaces:
    Iterable<E>, Collection<E>, List<E>, PrimitiveArray<E[],​E>

    public class ObjectArray<E>
    extends AbstractPrimitiveArray<E[],​E>
    An extensible, generic array of Object elements. Note that this class is a PrimitiveArray but of course Objects are not primitives. However, this class still facilitates improved conversion of Object array types to collections, and thus remains useful (if not completely accurately congruent with its type hierarchy).

    This class still provides a convenient way to work around Arrays.asList(Object...) creating a list with a single element. It also contains improved performance implementations of many Collection methods.

    Author:
    Mark Hiner, Johannes Schindelin, Curtis Rueden