Top Inners Methods
io.vavr.collection

pack-priv Interface IteratorModule

Located in compilation unit of io.vavr.collection.Iterator.


Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class
public static class
public static class
public static class
public static class

Method Summary

Modifier and TypeMethod and Description
public static <T> Tuple2<Iterator<T>, Iterator<T>>

Returns:

a pair of iterators
duplicate
(Iterator<T> iterator)

Creates two new iterators that both iterates over the same elements as this iterator and in the same order.

Method Detail

duplicateback to summary
public static <T> Tuple2<Iterator<T>, Iterator<T>> duplicate(Iterator<T> iterator)

Creates two new iterators that both iterates over the same elements as this iterator and in the same order. The duplicate iterators are considered equal if they are positioned at the same element.

Given that most methods on iterators will make the original iterator unfit for further use, this methods provides a reliable way of calling multiple such methods on an iterator.

Returns:Tuple2<Iterator<T>, Iterator<T>>

a pair of iterators

io.vavr.collection back to summary

public final Class IteratorModule.BigDecimalHelper

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final Lazy<BigDecimal>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv static boolean
areEqual(BigDecimal from, BigDecimal toExclusive)

pack-priv static BigDecimal
asDecimal(double number)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

INFINITY_DISTANCEback to summary
private static final Lazy<BigDecimal> INFINITY_DISTANCE
Annotations
@GwtIncompatible:Math::nextDown is not implemented

Constructor Detail

BigDecimalHelperback to summary
public BigDecimalHelper()

Method Detail

areEqualback to summary
pack-priv static boolean areEqual(BigDecimal from, BigDecimal toExclusive)
asDecimalback to summary
pack-priv static BigDecimal asDecimal(double number)
Annotations
@GwtIncompatible:Math::nextUp is not implemented
io.vavr.collection back to summary

public final Class IteratorModule.CachedIterator<T>

extends AbstractIterator<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private boolean
private T
private final Iterator<T>

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public T
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

pack-priv T
Inherited from io.vavr.collection.AbstractIterator:
nexttoString

Field Detail

cachedback to summary
private boolean cached
nextback to summary
private T next
thatback to summary
private final Iterator<T> that

Constructor Detail

CachedIteratorback to summary
pack-priv CachedIterator(Iterator<T> that)

Method Detail

getNextback to summary
public T getNext()

Implements abstract io.vavr.collection.AbstractIterator.getNext.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
touchback to summary
pack-priv T touch()
io.vavr.collection back to summary

public final Class IteratorModule.ConcatIterator<T>

extends AbstractIterator<T>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private Iterator<T>
private boolean
private IteratorModule.ConcatIterator.Cell<T>
private IteratorModule.ConcatIterator.Cell<T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
append(Iterator<? extends T> that)

public Iterator<T>
concat(Iterator<? extends T> that)

Overrides default io.vavr.collection.Iterator.concat.

public T
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

Inherited from io.vavr.collection.AbstractIterator:
nexttoString

Field Detail

currback to summary
private Iterator<T> curr
hasNextCalculatedback to summary
private boolean hasNextCalculated
lastback to summary
private IteratorModule.ConcatIterator.Cell<T> last
tailback to summary
private IteratorModule.ConcatIterator.Cell<T> tail

Constructor Detail

ConcatIteratorback to summary
public ConcatIterator()

Method Detail

appendback to summary
pack-priv void append(Iterator<? extends T> that)
concatback to summary
public Iterator<T> concat(Iterator<? extends T> that)

Overrides default io.vavr.collection.Iterator.concat.

Annotations
@Override
getNextback to summary
public T getNext()

Implements abstract io.vavr.collection.AbstractIterator.getNext.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
io.vavr.collection back to summary

private Class IteratorModule.ConcatIterator.Cell<T>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Iterator<T>
pack-priv IteratorModule.ConcatIterator.Cell<T>

Constructor Summary

AccessConstructor and Description
private
Cell()

Method Summary

Modifier and TypeMethod and Description
pack-priv IteratorModule.ConcatIterator.Cell<T>
pack-priv static <T> IteratorModule.ConcatIterator.Cell<T>
of(Iterator<T> it)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

itback to summary
pack-priv Iterator<T> it
nextback to summary
pack-priv IteratorModule.ConcatIterator.Cell<T> next

Constructor Detail

Cellback to summary
private Cell()

Method Detail

appendback to summary
pack-priv IteratorModule.ConcatIterator.Cell<T> append(Iterator<T> it)
ofback to summary
pack-priv static <T> IteratorModule.ConcatIterator.Cell<T> of(Iterator<T> it)
io.vavr.collection back to summary

public final Class IteratorModule.DistinctIterator<T, U>

extends AbstractIterator<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Function<? super T, ? extends U>
private Set<U>
private T
private boolean
private final Iterator<? extends T>

Constructor Summary

AccessConstructor and Description
pack-priv
DistinctIterator(Iterator<? extends T> that, Set<U> set, Function<? super T, ? extends U> keyExtractor)

Method Summary

Modifier and TypeMethod and Description
public T
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

private boolean
Inherited from io.vavr.collection.AbstractIterator:
nexttoString

Field Detail

keyExtractorback to summary
private final Function<? super T, ? extends U> keyExtractor
knownback to summary
private Set<U> known
nextback to summary
private T next
nextDefinedback to summary
private boolean nextDefined
thatback to summary
private final Iterator<? extends T> that

Constructor Detail

DistinctIteratorback to summary
pack-priv DistinctIterator(Iterator<? extends T> that, Set<U> set, Function<? super T, ? extends U> keyExtractor)

Method Detail

getNextback to summary
public T getNext()

Implements abstract io.vavr.collection.AbstractIterator.getNext.

Annotations
@Override
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
searchNextback to summary
private boolean searchNext()
io.vavr.collection back to summary

public final Class IteratorModule.EmptyIterator

extends Object
implements Iterator<Object>
Class Inheritance
All Implemented Interfaces
io.vavr.collection.Iterator, io.vavr.collection.Traversable, io.vavr.Value, java.lang.Iterable, io.vavr.collection.Foldable, java.util.Iterator

Field Summary

Modifier and TypeField and Description
pack-priv static final IteratorModule.EmptyIterator

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public Object
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

public String
stringPrefix()

Overrides default io.vavr.collection.Iterator.stringPrefix.

Returns the name of this Value type, which is used by toString().

public String
toString()

Overrides java.lang.Object.toString.

Implements io.vavr.Value.toString.

Clarifies that values have a proper toString() method implemented.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

INSTANCEback to summary
pack-priv static final IteratorModule.EmptyIterator INSTANCE

Constructor Detail

EmptyIteratorback to summary
public EmptyIterator()

Method Detail

hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public Object next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Object

the next element in the iteration

Annotations
@Override
stringPrefixback to summary
public String stringPrefix()

Overrides default io.vavr.collection.Iterator.stringPrefix.

Doc from io.vavr.Value.stringPrefix.

Returns the name of this Value type, which is used by toString().

Returns:String

This type name.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Implements io.vavr.Value.toString.

Doc from io.vavr.Value.toString.

Clarifies that values have a proper toString() method implemented.

See Object.toString().

Returns:String

A String representation of this object

Annotations
@Override
io.vavr.collection back to summary

public final Class IteratorModule.GroupedIterator<T>

extends Object
implements Iterator<Seq<T>>
Class Inheritance
All Implemented Interfaces
io.vavr.collection.Iterator, io.vavr.collection.Traversable, io.vavr.Value, java.lang.Iterable, io.vavr.collection.Foldable, java.util.Iterator

Field Summary

Modifier and TypeField and Description
private Object[]
private final int
private final int
private final int
private final int
private final Iterator<T>

Constructor Summary

AccessConstructor and Description
pack-priv
GroupedIterator(Iterator<T> that, int size, int step)

Method Summary

Modifier and TypeMethod and Description
private static void
drop(Iterator<?> source, int count)

public boolean
hasNext()

Implements java.util.Iterator.hasNext.

Returns true if the iteration has more elements.

public Seq<T>
next()

Implements java.util.Iterator.next.

Returns the next element in the iteration.

private static Object[]
take(Iterator<?> source, Object[] target, int offset, int count)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bufferback to summary
private Object[] buffer
gapback to summary
private final int gap
preserveback to summary
private final int preserve
sizeback to summary
private final int size
stepback to summary
private final int step
thatback to summary
private final Iterator<T> that

Constructor Detail

GroupedIteratorback to summary
pack-priv GroupedIterator(Iterator<T> that, int size, int step)

Method Detail

dropback to summary
private static void drop(Iterator<?> source, int count)
hasNextback to summary
public boolean hasNext()

Implements java.util.Iterator.hasNext.

Doc from java.util.Iterator.hasNext.

Returns true if the iteration has more elements. (In other words, returns true if next would return an element rather than throwing an exception.)

Returns:boolean

true if the iteration has more elements

Annotations
@Override
nextback to summary
public Seq<T> next()

Implements java.util.Iterator.next.

Doc from java.util.Iterator.next.

Returns the next element in the iteration.

Returns:Seq<T>

the next element in the iteration

Annotations
@Override
takeback to summary
private static Object[] take(Iterator<?> source, Object[] target, int offset, int count)