public interface PrimitiveFloatIterable
extends java.lang.Iterable<java.lang.Float>
Modifier and Type | Field and Description |
---|---|
static PrimitiveFloatIterable |
EMPTY
Empty iterable of primitive float values.
|
static PrimitiveFloatIterator |
EMPTY_FLOAT_ITERATOR
Empty iterator of primitive float values.
|
Modifier and Type | Method and Description |
---|---|
default PrimitiveDoubleIterable |
asDoubleIterable()
View this float iterable as a double iterable.
|
default boolean |
containsFloat(float value)
Does this float iterable contain the given value?
|
default boolean |
containsFloat(float value,
float eps)
Does this float iterable contain the given value?
|
PrimitiveFloatIterator |
floatIterator()
Get a primitive float iterator.
|
default void |
forEachFloat(FloatConsumer action)
Invoke the given action with each float value in this iterable.
|
default <E extends java.lang.Exception> |
forEachFloatFragile(FragileFloatConsumer<E> action)
Invoke the given fragile action with each value in this iterable.
|
default java.util.Iterator<java.lang.Float> |
iterator() |
static final PrimitiveFloatIterator EMPTY_FLOAT_ITERATOR
PrimitiveFloatIterator.EMPTY
static final PrimitiveFloatIterable EMPTY
@NotNull PrimitiveFloatIterator floatIterator()
@NotNull default java.util.Iterator<java.lang.Float> iterator()
iterator
in interface java.lang.Iterable<java.lang.Float>
default void forEachFloat(@NotNull FloatConsumer action)
action
- action to be call for each float value in sequemce.default <E extends java.lang.Exception> void forEachFloatFragile(@NotNull FragileFloatConsumer<E> action) throws E extends java.lang.Exception
E
- checked exception thrown by actionaction
- action to be called for each value in sequenceE
- if action
throws itE extends java.lang.Exception
default boolean containsFloat(float value)
value
- value to check fortrue
if the value is contained in this iterable, false
if notdefault boolean containsFloat(float value, float eps)
containsFloat(float)
this allows for a small deviation.value
- value to check foreps
- epsilon defining the possible deviation from value
which is still accepted,
using 0.0f
will behave like containsFloat(float)
true
if this iterable contains the value within the given epsilon,
false
if not@NotNull default PrimitiveDoubleIterable asDoubleIterable()