Interface Sink<T>

Type Parameters:
T - Type of accepted items.
All Superinterfaces:
Consumer<T>

@PublicAPI @Beta @Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) public interface Sink<T> extends Consumer<T>
Deprecated, for removal: This API element is subject to removal in a future version.
Use Consumer instead.
Consume accepting values.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    accept(T t)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    void
    put(T t)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Put new item into this sink.

    Methods inherited from interface java.util.function.Consumer

    andThen
  • Method Details

    • put

      void put(T t) throws IllegalStateException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Put new item into this sink.
      Parameters:
      t - Item to put
      Throws:
      IllegalStateException - when underlying Appendable fails.
    • accept

      default void accept(T t)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      accept in interface Consumer<T>