Class ValueIdentityBiFunction<K,V>
java.lang.Object
org.keycloak.models.sessions.infinispan.stream.ValueIdentityBiFunction<K,V>
- Type Parameters:
K- The type of the first argument (key). This parameter is ignored by the function.V- The type of the second argument (value). This parameter is returned unchanged.
- All Implemented Interfaces:
BiFunction<K,V, V>
@ProtoTypeId(65619)
public final class ValueIdentityBiFunction<K,V>
extends Object
implements BiFunction<K,V,V>
A
BiFunction implementation that returns the second argument unchanged, effectively acting as an identity
function for the value parameter.
This class is used in Infinispan cache operations where a BiFunction is required but only the value needs to
be preserved without any transformation. The key parameter is ignored.
The class is implemented as a stateless singleton and is serializable via Infinispan ProtoStream to support distributed cache operations in remote caches.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value parameter unchanged, ignoring the key parameter.static <T,E> ValueIdentityBiFunction<T, E> Returns the singleton instance of this function.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.BiFunction
andThen
-
Method Details
-
getInstance
Returns the singleton instance of this function.This method is annotated with
ProtoFactoryto enable Infinispan ProtoStream serialization for remote cache operations.- Type Parameters:
T- The type of the key parameterE- The type of the value parameter- Returns:
- The singleton instance of
ValueIdentityBiFunction
-
apply
Returns the value parameter unchanged, ignoring the key parameter.- Specified by:
applyin interfaceBiFunction<K,V, V> - Parameters:
k- The key parameter (ignored)v- The value parameter to return- Returns:
- The value parameter unchanged
-