Class DoubleBigLists.Singleton

java.lang.Object
java.util.AbstractCollection<Double>
it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
it.unimi.dsi.fastutil.doubles.AbstractDoubleBigList
it.unimi.dsi.fastutil.doubles.DoubleBigLists.Singleton
All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Double>, DoubleBigList, it.unimi.dsi.fastutil.doubles.DoubleCollection, it.unimi.dsi.fastutil.doubles.DoubleIterable, it.unimi.dsi.fastutil.doubles.DoubleStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Double>, Serializable, Cloneable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Double>>, Iterable<Double>, Collection<Double>
Enclosing class:
DoubleBigLists

public static class DoubleBigLists.Singleton extends AbstractDoubleBigList implements Serializable, Cloneable
An immutable class representing a type-specific singleton big list.

This class may be useful to implement your own in case you subclass a type-specific big list.

See Also:
  • Constructor Details

    • Singleton

      protected Singleton(double element)
  • Method Details

    • getDouble

      public double getDouble(long i)
      Description copied from interface: DoubleBigList
      Returns the element at the specified position.
      Specified by:
      getDouble in interface DoubleBigList
      See Also:
      • BigList.get(long)
    • rem

      public boolean rem(double k)
      Description copied from class: AbstractDoubleBigList
      Removes a single instance of the specified element from this collection, if it is present (optional operation).
      Specified by:
      rem in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      rem in class AbstractDoubleBigList
      See Also:
    • removeDouble

      public double removeDouble(long i)
      Description copied from class: AbstractDoubleBigList
      Removes the element at the specified position.
      Specified by:
      removeDouble in interface DoubleBigList
      Overrides:
      removeDouble in class AbstractDoubleBigList
      See Also:
      • BigList.remove(long)
    • contains

      public boolean contains(double k)
      Description copied from class: AbstractDoubleBigList
      Returns true if this list contains the specified element.
      Specified by:
      contains in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      contains in class AbstractDoubleBigList
      See Also:
    • indexOf

      public long indexOf(double k)
      Description copied from interface: DoubleBigList
      Returns the index of the first occurrence of the specified element in this type-specific big list, or -1 if this big list does not contain the element.
      Specified by:
      indexOf in interface DoubleBigList
      Overrides:
      indexOf in class AbstractDoubleBigList
      See Also:
      • BigList.indexOf(Object)
    • toDoubleArray

      public double[] toDoubleArray()
      Specified by:
      toDoubleArray in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      toDoubleArray in class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
    • listIterator

      public it.unimi.dsi.fastutil.doubles.DoubleBigListIterator listIterator()
      Description copied from class: AbstractDoubleBigList
      Returns a type-specific big-list iterator on this type-specific big list.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Double>
      Specified by:
      listIterator in interface DoubleBigList
      Overrides:
      listIterator in class AbstractDoubleBigList
      See Also:
      • BigList.listIterator()
    • listIterator

      public it.unimi.dsi.fastutil.doubles.DoubleBigListIterator listIterator(long i)
      Description copied from class: AbstractDoubleBigList
      Returns a type-specific list iterator on this type-specific big list starting at a given index.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Double>
      Specified by:
      listIterator in interface DoubleBigList
      Overrides:
      listIterator in class AbstractDoubleBigList
      See Also:
      • BigList.listIterator(long)
    • spliterator

      public it.unimi.dsi.fastutil.doubles.DoubleSpliterator spliterator()
      Description copied from interface: DoubleBigList
      Returns a type-specific spliterator on the elements of this big-list.

      BigList spliterators must report at least Spliterator.SIZED and Spliterator.ORDERED.

      See List.spliterator() for more documentation on the requirements of the returned spliterator (despite BigList not being a List, most of the same requirements apply.

      Specified by:
      spliterator in interface Collection<Double>
      Specified by:
      spliterator in interface DoubleBigList
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.doubles.DoubleIterable
      Specified by:
      spliterator in interface Iterable<Double>
      Returns:
    • 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 it.unimi.dsi.fastutil.BigList<Double>
      Specified by:
      subList in interface DoubleBigList
      Overrides:
      subList in class AbstractDoubleBigList
      See Also:
      • BigList.subList(long,long)
    • addAll

      public boolean addAll(long i, Collection<? extends 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 it.unimi.dsi.fastutil.BigList<Double>
      Overrides:
      addAll in class AbstractDoubleBigList
    • addAll

      public boolean addAll(Collection<? extends Double> c)
      Description copied from class: AbstractDoubleBigList
      Specified by:
      addAll in interface Collection<Double>
      Overrides:
      addAll in class AbstractDoubleBigList
    • removeAll

      public boolean removeAll(Collection<?> c)
      Specified by:
      removeAll in interface Collection<Double>
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
    • retainAll

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Double>
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
    • 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:
    • addAll

      public boolean addAll(long i, DoubleBigList c)
      Description copied from interface: DoubleBigList
      Inserts all of the elements in the specified type-specific big list into this type-specific big list at the specified position (optional operation).
      Specified by:
      addAll in interface DoubleBigList
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      public boolean addAll(long i, it.unimi.dsi.fastutil.doubles.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:
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c)
      Description copied from class: AbstractDoubleBigList
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      addAll in class AbstractDoubleBigList
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.doubles.DoubleCollection c)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.doubles.DoubleCollection
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.doubles.AbstractDoubleCollection
    • clear

      public void clear()
      Description copied from class: AbstractDoubleBigList
      Specified by:
      clear in interface Collection<Double>
      Overrides:
      clear in class AbstractDoubleBigList
    • size64

      public long size64()
      Specified by:
      size64 in interface it.unimi.dsi.fastutil.Size64
    • clone

      public Object clone()
      Overrides:
      clone in class Object