public interface KeyedVisitable<K,E>
| Modifier and Type | Method and Description |
|---|---|
default <T,R> R |
applyToKey(K key,
net.openhft.chronicle.core.util.SerializableBiFunction<E,T,R> function,
T argument)
Apply a function which takes an argument.
|
default <R> R |
applyToKey(K key,
net.openhft.chronicle.core.util.SerializableFunction<E,R> function)
Apply a function to the visitable and return the result.
|
default <T> void |
asyncUpdateKey(K key,
net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction,
T argument)
Apply a function to visitable potentially asynchronously.
|
default void |
asyncUpdateKey(K key,
net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction)
Apply a function to visitable potentially asynchronously.
|
E |
get(K key) |
void |
set(K key,
E element) |
default <T,RT,R> R |
syncUpdateKey(K key,
net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction,
T updateArgument,
net.openhft.chronicle.core.util.SerializableBiFunction<E,RT,R> returnFunction,
RT returnArgument)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
default <R> R |
syncUpdateKey(K key,
net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction,
net.openhft.chronicle.core.util.SerializableFunction<E,R> returnFunction)
Apply a function to update the state of a visible, and apply a function to return a result object synchronously.
|
@Nullable E get(K key)
key - to get within this collection.void set(K key, E element)
key - to set within this collection.element - replace the current state of the visitable Assetdefault <R> R applyToKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableFunction<E,R> function)
R - data type to return.key - to visit within this collection.function - to apply e.g. call a getterdefault void asyncUpdateKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction)
key - to visit within this collection.updateFunction - to update the state of the visitiable.default <R> R syncUpdateKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableFunction<E,E> updateFunction, @NotNull net.openhft.chronicle.core.util.SerializableFunction<E,R> returnFunction)
R - data type to return.key - to update within this collection.updateFunction - update to apply to the value.returnFunction - derive an object to returndefault <T,R> R applyToKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<E,T,R> function, T argument)
T - type of the argumentR - type of the return value.key - to visit within this collection.function - to applyargument - for the functions use.default <T> void asyncUpdateKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction, T argument)
T - type of the argumentkey - to update within this collectionupdateFunction - to update the state of the visitiable.argument - for the functions use.default <T,RT,R> R syncUpdateKey(K key, @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<E,T,E> updateFunction, @Nullable T updateArgument, @NotNull net.openhft.chronicle.core.util.SerializableBiFunction<E,RT,R> returnFunction, @Nullable RT returnArgument)
R - data type to return.key - to update within this collectionupdateFunction - update to apply to the value.updateArgument - for the update function to use.returnFunction - derive an object to returnreturnArgument - for the return value function to useCopyright © 2015. All rights reserved.