Top Description Fields Constructors Methods
org.apache.avro.util.internal

public Class ClassValueCache<R>

extends Object
implements Function<Class<?>, R>
Class Inheritance
All Implemented Interfaces
java.util.function.Function
Type Parameters
<R>
Return type of the ClassValue
Imports
java.util.function.Function

Wraps a ClassValue cache so it can be overridden in an android environment, where it isn't available.

Field Summary

Modifier and TypeField and Description
private final ClassValue<R>
private final Function<Class<?>, R>

Constructor Summary

AccessConstructor and Description
public
ClassValueCache(Function<Class<?>, R> ifAbsent)

Method Summary

Modifier and TypeMethod and Description
public R
apply(Class<?>
the function argument
c
)

Implements java.util.function.Function.apply.

Applies this function to the given argument.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

cacheback to summary
private final ClassValue<R> cache
ifAbsentback to summary
private final Function<Class<?>, R> ifAbsent

Constructor Detail

ClassValueCacheback to summary
public ClassValueCache(Function<Class<?>, R> ifAbsent)

Method Detail

applyback to summary
public R apply(Class<?> c)

Implements java.util.function.Function.apply.

Doc from java.util.function.Function.apply.

Applies this function to the given argument.

Parameters
c:Class<?>

the function argument

Returns:R

the function result

Annotations
@Override