Class BooleanBigLists.ListBigList

    • Method Detail

      • size64

        public long size64()
        Description copied from interface: Size64
        Returns the size of this data structure as a long.
        Specified by:
        size64 in interface Size64
        Returns:
        the size of this data structure.
      • size

        public void size​(long size)
        Description copied from interface: BigList
        Sets the size of this big list.

        If the specified size is smaller than the current size, the last elements are discarded. Otherwise, they are filled with 0/null/false.

        Specified by:
        size in interface BigList<java.lang.Boolean>
        Overrides:
        size in class AbstractBooleanBigList
        Parameters:
        size - the new size.
      • addAll

        public boolean addAll​(long index,
                              java.util.Collection<? extends java.lang.Boolean> c)
        Description copied from class: AbstractBooleanBigList
        Adds all of the elements in the specified collection to this list (optional operation).
        Specified by:
        addAll in interface BigList<java.lang.Boolean>
        Overrides:
        addAll in class AbstractBooleanBigList
        Parameters:
        index - index at which to insert the first element from the specified collection.
        c - collection containing elements to be added to this big list.
        Returns:
        true if this big list changed as a result of the call
        See Also:
        List.addAll(int, Collection)
      • subList

        public BooleanBigList subList​(long from,
                                      long to)
        Description copied from interface: BooleanBigList
        Returns a type-specific view of the portion of this type-specific big list from the index from, inclusive, to the index to, exclusive.
        Specified by:
        subList in interface BigList<java.lang.Boolean>
        Specified by:
        subList in interface BooleanBigList
        Overrides:
        subList in class AbstractBooleanBigList
        Parameters:
        from - the starting element (inclusive).
        to - the ending element (exclusive).
        Returns:
        a big sublist view of this big list.
        See Also:
        BigList.subList(long,long)
      • removeElements

        public void removeElements​(long from,
                                   long to)
        Description copied from class: AbstractBooleanBigList
        Removes (hopefully quickly) elements of this type-specific big list.

        This is a trivial iterator-based implementation. It is expected that implementations will override this method with a more optimized version.

        Specified by:
        removeElements in interface BooleanBigList
        Overrides:
        removeElements in class AbstractBooleanBigList
        Parameters:
        from - the start index (inclusive).
        to - the end index (exclusive).
      • toBooleanArray

        @Deprecated
        public boolean[] toBooleanArray​(boolean[] a)
        Deprecated.
        Description copied from class: AbstractBooleanCollection
        Returns a primitive type array containing the items of this collection.

        Note that, contrarily to Collection.toArray(Object[]), this methods just writes all elements of this collection: no special value will be added after the last one.

        Specified by:
        toBooleanArray in interface BooleanCollection
        Overrides:
        toBooleanArray in class AbstractBooleanCollection
        Parameters:
        a - if this array is big enough, it will be used to store this collection.
        Returns:
        a primitive type array containing the items of this collection.
        See Also:
        Collection.toArray(Object[])
      • addAll

        public boolean addAll​(BooleanBigList c)
        Description copied from interface: BooleanBigList
        Appends all of the elements in the specified type-specific big list to the end of this type-specific big list (optional operation).
        Specified by:
        addAll in interface BooleanBigList
        See Also:
        Collection.addAll(Collection)
      • containsAll

        public boolean containsAll​(BooleanCollection c)
        Description copied from interface: BooleanCollection
        Checks whether this collection contains all elements from the given type-specific collection.
        Specified by:
        containsAll in interface BooleanCollection
        Overrides:
        containsAll in class AbstractBooleanCollection
        Parameters:
        c - a type-specific collection.
        Returns:
        true if this collection contains all elements of the argument.
        See Also:
        Collection.containsAll(Collection)
      • isEmpty

        public boolean isEmpty()
        Description copied from interface: Stack
        Checks whether the stack is empty.
        Specified by:
        isEmpty in interface java.util.Collection<java.lang.Boolean>
        Specified by:
        isEmpty in interface Stack<java.lang.Boolean>
        Overrides:
        isEmpty in class java.util.AbstractCollection<java.lang.Boolean>
        Returns:
        true if the stack is empty.
      • toArray

        public <T> T[] toArray​(T[] a)
        Specified by:
        toArray in interface java.util.Collection<java.lang.Boolean>
        Overrides:
        toArray in class java.util.AbstractCollection<java.lang.Boolean>
      • addAll

        public boolean addAll​(java.util.Collection<? extends java.lang.Boolean> c)
        Description copied from class: AbstractBooleanBigList
        Specified by:
        addAll in interface java.util.Collection<java.lang.Boolean>
        Overrides:
        addAll in class AbstractBooleanBigList
      • hashCode

        public int hashCode()
        Description copied from class: AbstractBooleanBigList
        Returns the hash code for this big list, which is identical to List.hashCode().
        Specified by:
        hashCode in interface java.util.Collection<java.lang.Boolean>
        Overrides:
        hashCode in class AbstractBooleanBigList
        Returns:
        the hash code for this big list.