Interface Strings.TextConsumer

All Superinterfaces:
Consumer<String>, IntConsumer
Enclosing class:
Strings
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface Strings.TextConsumer extends IntConsumer, Consumer<String>
Functional interface for consuming text from either strings or single Unicode code points.

Implementing classes must override the method accept(int). Implementing classes may override the method accept(String) if a more efficient implementation can be provided.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(int codePoint)
    Consume a fragment of text given by a single Unicode code point.
    default void
    accept(String text)
    Consume a fragment of text given by a string.
    Returns a consumer view of a given string builder.

    Methods inherited from interface java.util.function.Consumer

    andThen

    Methods inherited from interface java.util.function.IntConsumer

    andThen