Class DoubleBigLists.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.Double>
        Overrides:
        size in class AbstractDoubleBigList
        Parameters:
        size - the new size.
      • addAll

        public boolean addAll​(long index,
                              java.util.Collection<? extends java.lang.Double> c)
        Description copied from class: AbstractDoubleBigList
        Adds all of the elements in the specified collection to this list (optional operation).
        Specified by:
        addAll in interface BigList<java.lang.Double>
        Overrides:
        addAll in class AbstractDoubleBigList
        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 DoubleBigList subList​(long from,
                                     long to)
        Description copied from interface: DoubleBigList
        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.Double>
        Specified by:
        subList in interface DoubleBigList
        Overrides:
        subList in class AbstractDoubleBigList
        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: AbstractDoubleBigList
        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 DoubleBigList
        Overrides:
        removeElements in class AbstractDoubleBigList
        Parameters:
        from - the start index (inclusive).
        to - the end index (exclusive).
      • toDoubleArray

        @Deprecated
        public double[] toDoubleArray​(double[] a)
        Deprecated.
        Description copied from class: AbstractDoubleCollection
        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:
        toDoubleArray in interface DoubleCollection
        Overrides:
        toDoubleArray in class AbstractDoubleCollection
        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​(long index,
                              DoubleCollection c)
        Description copied from class: AbstractDoubleBigList
        Inserts all of the elements in the specified type-specific collection into this type-specific big list at the specified position (optional operation).
        Specified by:
        addAll in interface DoubleBigList
        Overrides:
        addAll in class AbstractDoubleBigList
        See Also:
        List.addAll(int,java.util.Collection)
      • addAll

        public boolean addAll​(DoubleCollection c)
        Description copied from class: AbstractDoubleBigList
        Adds all elements of the given type-specific collection to this collection.
        Specified by:
        addAll in interface DoubleCollection
        Overrides:
        addAll in class AbstractDoubleBigList
        Parameters:
        c - a type-specific collection.
        Returns:
        true if this collection changed as a result of the call.
        See Also:
        Collection.addAll(Collection)
      • addAll

        public boolean addAll​(DoubleBigList c)
        Description copied from interface: DoubleBigList
        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 DoubleBigList
        See Also:
        Collection.addAll(Collection)
      • containsAll

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

        public boolean removeAll​(DoubleCollection c)
        Description copied from interface: DoubleCollection
        Remove from this collection all elements in the given type-specific collection.
        Specified by:
        removeAll in interface DoubleCollection
        Overrides:
        removeAll in class AbstractDoubleCollection
        Parameters:
        c - a type-specific collection.
        Returns:
        true if this collection changed as a result of the call.
        See Also:
        Collection.removeAll(Collection)
      • retainAll

        public boolean retainAll​(DoubleCollection c)
        Description copied from interface: DoubleCollection
        Retains in this collection only elements from the given type-specific collection.
        Specified by:
        retainAll in interface DoubleCollection
        Overrides:
        retainAll in class AbstractDoubleCollection
        Parameters:
        c - a type-specific collection.
        Returns:
        true if this collection changed as a result of the call.
        See Also:
        Collection.retainAll(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.Double>
        Specified by:
        isEmpty in interface Stack<java.lang.Double>
        Overrides:
        isEmpty in class java.util.AbstractCollection<java.lang.Double>
        Returns:
        true if the stack is empty.
      • toArray

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

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

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