Class ByteIterators.EmptyIterator

java.lang.Object
it.unimi.dsi.fastutil.bytes.ByteIterators.EmptyIterator
All Implemented Interfaces:
it.unimi.dsi.fastutil.BidirectionalIterator<Byte>, ByteBidirectionalIterator, it.unimi.dsi.fastutil.bytes.ByteIterator, ByteListIterator, it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Byte>, it.unimi.dsi.fastutil.objects.ObjectIterator<Byte>, Serializable, Cloneable, Iterator<Byte>, ListIterator<Byte>, PrimitiveIterator<Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer>
Enclosing class:
ByteIterators

public static class ByteIterators.EmptyIterator extends Object implements ByteListIterator, Serializable, Cloneable
A class returning no elements and a type-specific iterator interface.

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

See Also:
  • Constructor Details

    • EmptyIterator

      protected EmptyIterator()
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<Byte>
      Specified by:
      hasNext in interface ListIterator<Byte>
    • hasPrevious

      public boolean hasPrevious()
      Specified by:
      hasPrevious in interface it.unimi.dsi.fastutil.BidirectionalIterator<Byte>
      Specified by:
      hasPrevious in interface ListIterator<Byte>
    • nextByte

      public byte nextByte()
      Specified by:
      nextByte in interface it.unimi.dsi.fastutil.bytes.ByteIterator
    • previousByte

      public byte previousByte()
      Description copied from interface: ByteBidirectionalIterator
      Returns the previous element as a primitive type.
      Specified by:
      previousByte in interface ByteBidirectionalIterator
      Returns:
      the previous element in the iteration.
      See Also:
    • nextIndex

      public int nextIndex()
      Specified by:
      nextIndex in interface ListIterator<Byte>
    • previousIndex

      public int previousIndex()
      Specified by:
      previousIndex in interface ListIterator<Byte>
    • skip

      public int skip(int n)
      Description copied from interface: ByteBidirectionalIterator
      Specified by:
      skip in interface ByteBidirectionalIterator
      Specified by:
      skip in interface it.unimi.dsi.fastutil.bytes.ByteIterator
      Specified by:
      skip in interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Byte>
      Specified by:
      skip in interface it.unimi.dsi.fastutil.objects.ObjectIterator<Byte>
    • back

      public int back(int n)
      Description copied from interface: ByteBidirectionalIterator
      Moves back for the given number of elements.

      The effect of this call is exactly the same as that of calling ByteBidirectionalIterator.previous() for n times (possibly stopping if BidirectionalIterator.hasPrevious() becomes false).

      Specified by:
      back in interface ByteBidirectionalIterator
      Specified by:
      back in interface it.unimi.dsi.fastutil.objects.ObjectBidirectionalIterator<Byte>
      Parameters:
      n - the number of elements to skip back.
      Returns:
      the number of elements actually skipped.
      See Also:
    • forEachRemaining

      public void forEachRemaining(it.unimi.dsi.fastutil.bytes.ByteConsumer action)
      Specified by:
      forEachRemaining in interface it.unimi.dsi.fastutil.bytes.ByteIterator
      Specified by:
      forEachRemaining in interface PrimitiveIterator<Byte,it.unimi.dsi.fastutil.bytes.ByteConsumer>
    • forEachRemaining

      @Deprecated public void forEachRemaining(Consumer<? super Byte> action)
      Deprecated.
      Specified by:
      forEachRemaining in interface it.unimi.dsi.fastutil.bytes.ByteIterator
      Specified by:
      forEachRemaining in interface Iterator<Byte>
    • clone

      public Object clone()
      Overrides:
      clone in class Object