T - the type of the input to the operation
Example usage:
Updater<List<String>> appender = list -> list.add("newElement");
List<String> myList = new ArrayList<>();
appender.update(myList);
@FunctionalInterface public interface Updater<T> extends Consumer<T>
Similar to Consumer, but unlike Consumer, Updater is explicitly
expected to perform modifications on its argument.
| Modifier and Type | Method and Description |
|---|---|
default void |
accept(T t)
This default implementation simply calls the
update method. |
void |
update(T t)
Performs this operation on the given argument, altering it in some way.
|
void update(T t)
t - the input argumentCopyright © 2024. All rights reserved.