Class ByteBigLists.Singleton

java.lang.Object
java.util.AbstractCollection<Byte>
it.unimi.dsi.fastutil.bytes.AbstractByteCollection
it.unimi.dsi.fastutil.bytes.AbstractByteBigList
it.unimi.dsi.fastutil.bytes.ByteBigLists.Singleton
All Implemented Interfaces:
it.unimi.dsi.fastutil.BigList<Byte>, ByteBigList, it.unimi.dsi.fastutil.bytes.ByteCollection, it.unimi.dsi.fastutil.bytes.ByteIterable, it.unimi.dsi.fastutil.bytes.ByteStack, it.unimi.dsi.fastutil.Size64, it.unimi.dsi.fastutil.Stack<Byte>, Serializable, Cloneable, Comparable<it.unimi.dsi.fastutil.BigList<? extends Byte>>, Iterable<Byte>, Collection<Byte>
Enclosing class:
ByteBigLists

public static class ByteBigLists.Singleton extends AbstractByteBigList 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(byte element)
  • Method Details

    • getByte

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

      public boolean rem(byte k)
      Description copied from class: AbstractByteBigList
      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.bytes.ByteCollection
      Overrides:
      rem in class AbstractByteBigList
      See Also:
    • removeByte

      public byte removeByte(long i)
      Description copied from class: AbstractByteBigList
      Removes the element at the specified position.
      Specified by:
      removeByte in interface ByteBigList
      Overrides:
      removeByte in class AbstractByteBigList
      See Also:
      • BigList.remove(long)
    • contains

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

      public long indexOf(byte k)
      Description copied from interface: ByteBigList
      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 ByteBigList
      Overrides:
      indexOf in class AbstractByteBigList
      See Also:
      • BigList.indexOf(Object)
    • toByteArray

      public byte[] toByteArray()
      Specified by:
      toByteArray in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Overrides:
      toByteArray in class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
    • listIterator

      public it.unimi.dsi.fastutil.bytes.ByteBigListIterator listIterator()
      Description copied from class: AbstractByteBigList
      Returns a type-specific big-list iterator on this type-specific big list.
      Specified by:
      listIterator in interface it.unimi.dsi.fastutil.BigList<Byte>
      Specified by:
      listIterator in interface ByteBigList
      Overrides:
      listIterator in class AbstractByteBigList
      See Also:
      • BigList.listIterator()
    • listIterator

      public it.unimi.dsi.fastutil.bytes.ByteBigListIterator listIterator(long i)
      Description copied from class: AbstractByteBigList
      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<Byte>
      Specified by:
      listIterator in interface ByteBigList
      Overrides:
      listIterator in class AbstractByteBigList
      See Also:
      • BigList.listIterator(long)
    • spliterator

      public it.unimi.dsi.fastutil.bytes.ByteSpliterator spliterator()
      Description copied from interface: ByteBigList
      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 ByteBigList
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Specified by:
      spliterator in interface it.unimi.dsi.fastutil.bytes.ByteIterable
      Specified by:
      spliterator in interface Collection<Byte>
      Specified by:
      spliterator in interface Iterable<Byte>
      Returns:
    • subList

      public ByteBigList subList(long from, long to)
      Description copied from interface: ByteBigList
      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<Byte>
      Specified by:
      subList in interface ByteBigList
      Overrides:
      subList in class AbstractByteBigList
      See Also:
      • BigList.subList(long,long)
    • addAll

      public boolean addAll(long i, Collection<? extends Byte> c)
      Description copied from class: AbstractByteBigList
      Adds all of the elements in the specified collection to this list (optional operation).
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.BigList<Byte>
      Overrides:
      addAll in class AbstractByteBigList
    • addAll

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

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

      public boolean retainAll(Collection<?> c)
      Specified by:
      retainAll in interface Collection<Byte>
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
    • addAll

      public boolean addAll(ByteBigList c)
      Description copied from interface: ByteBigList
      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 ByteBigList
      See Also:
    • addAll

      public boolean addAll(long i, ByteBigList c)
      Description copied from interface: ByteBigList
      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 ByteBigList
      See Also:
      • BigList.addAll(long,Collection)
    • addAll

      public boolean addAll(long i, it.unimi.dsi.fastutil.bytes.ByteCollection c)
      Description copied from class: AbstractByteBigList
      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 ByteBigList
      Overrides:
      addAll in class AbstractByteBigList
      See Also:
    • addAll

      public boolean addAll(it.unimi.dsi.fastutil.bytes.ByteCollection c)
      Description copied from class: AbstractByteBigList
      Specified by:
      addAll in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Overrides:
      addAll in class AbstractByteBigList
    • removeAll

      public boolean removeAll(it.unimi.dsi.fastutil.bytes.ByteCollection c)
      Specified by:
      removeAll in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Overrides:
      removeAll in class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
    • retainAll

      public boolean retainAll(it.unimi.dsi.fastutil.bytes.ByteCollection c)
      Specified by:
      retainAll in interface it.unimi.dsi.fastutil.bytes.ByteCollection
      Overrides:
      retainAll in class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
    • clear

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

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

      public Object clone()
      Overrides:
      clone in class Object