Class ObjectListImpl

    • Field Detail

      • EMPTY_LIST

        public static final ObjectListImpl EMPTY_LIST
        An immutable empty list.
    • Constructor Detail

      • ObjectListImpl

        public ObjectListImpl​(Object[] array,
                              int length)
    • Method Detail

      • getLength

        public int getLength()
        Description copied from interface: ObjectList
        The number of Objects in the list. The range of valid child object indices is 0 to length-1 inclusive.
        Specified by:
        getLength in interface ObjectList
      • contains

        public boolean contains​(Object item)
        Description copied from interface: ObjectList
        Checks if the Object item is a member of this list.
        Specified by:
        contains in interface Collection
        Specified by:
        contains in interface List
        Specified by:
        contains in interface ObjectList
        Overrides:
        contains in class AbstractCollection
        Parameters:
        item - Object whose presence in this list is to be tested.
        Returns:
        True if this list contains the Object item.
      • item

        public Object item​(int index)
        Description copied from interface: ObjectList
        Returns the indexth item in the collection or null if index is greater than or equal to the number of objects in the list. The index starts at 0.
        Specified by:
        item in interface ObjectList
        Parameters:
        index - index into the collection.
        Returns:
        The Object at the indexth position in the ObjectList, or null if the index specified is not valid - greater than or equal to the number of items in the list or less than zero.