Package com.fauna.codec
Class OptionalOf<V>
- java.lang.Object
-
- com.fauna.codec.ParameterizedOf<java.util.Optional<V>>
-
- com.fauna.codec.OptionalOf<V>
-
- Type Parameters:
V
- The element type within the optional.
- All Implemented Interfaces:
java.lang.reflect.ParameterizedType
,java.lang.reflect.Type
public final class OptionalOf<V> extends ParameterizedOf<java.util.Optional<V>>
Represents anOptional
with a specified element type, allowing for retention of the generic typeV
during deserialization by circumventing type erasure.
-
-
Constructor Summary
Constructors Constructor Description OptionalOf(java.lang.Class<V> valueClass)
Constructs anOptionalOf
instance for the specified element type.
-
Method Summary
-
Methods inherited from class com.fauna.codec.ParameterizedOf
getActualTypeArguments, getOwnerType, getRawType
-
-
-
-
Constructor Detail
-
OptionalOf
public OptionalOf(java.lang.Class<V> valueClass)
Constructs anOptionalOf
instance for the specified element type.- Parameters:
valueClass
- The class of the elements contained in the optional.
-
-