@FunctionalInterface
public interface FloatConsumer
extends java.util.function.Consumer<java.lang.Float>, java.util.function.DoubleConsumer
Consumer
; provides methods to consume a primitive type both as object
and as primitive.
Except for the boolean case, this interface extends both a parameterized Consumer
and a type-specific JDK consumer (e.g., IntConsumer
). For types missing
a type-specific JDK consumer (e.g., short
or float
), we extend the consumer associated with
the smallest primitive type that can represent the current type (e.g., int
or double
, respectively).
Consumer
Modifier and Type | Method and Description |
---|---|
default void |
accept(double t)
Deprecated.
Please use the corresponding exact type-specific method instead.
|
void |
accept(float t)
Performs this operation on the given input.
|
default void |
accept(java.lang.Float t)
Deprecated.
Please use the corresponding type-specific method instead.
|
default java.util.function.Consumer<java.lang.Float> |
andThen(java.util.function.Consumer<? super java.lang.Float> after)
Deprecated.
Please use the corresponding type-specific method instead.
|
default FloatConsumer |
andThen(java.util.function.DoubleConsumer after) |
default FloatConsumer |
andThen(FloatConsumer after)
Returns a composed type-specific consumer that performs, in sequence, this
operation followed by the
after operation. |
void accept(float t)
t
- the input.@Deprecated default void accept(double t)
accept
in interface java.util.function.DoubleConsumer
@Deprecated default void accept(java.lang.Float t)
accept
in interface java.util.function.Consumer<java.lang.Float>
default FloatConsumer andThen(FloatConsumer after)
after
operation.after
- the operation to perform after this operation.Consumer
that performs in sequence this
operation followed by the after
operation.Consumer.andThen(java.util.function.Consumer<? super T>)
default FloatConsumer andThen(java.util.function.DoubleConsumer after)
andThen
in interface java.util.function.DoubleConsumer
@Deprecated default java.util.function.Consumer<java.lang.Float> andThen(java.util.function.Consumer<? super java.lang.Float> after)
andThen
in interface java.util.function.Consumer<java.lang.Float>