Package se.l4.graphql.binding.internal
Class ContextValueImpl<T>
java.lang.Object
se.l4.graphql.binding.internal.ContextValueImpl<T>
- All Implemented Interfaces:
ContextValue<T>
public class ContextValueImpl<T> extends Object implements ContextValue<T>
Implementation of
ContextValue
.-
Constructor Summary
Constructors Constructor Description ContextValueImpl(graphql.GraphQLContext context, String name)
-
Method Summary
-
Constructor Details
-
Method Details
-
isPresent
public boolean isPresent()Description copied from interface:ContextValue
Get if the value is present.- Specified by:
isPresent
in interfaceContextValue<T>
- Returns:
-
get
Description copied from interface:ContextValue
Get the current value if it is present. Will throw an error if the value is not present.- Specified by:
get
in interfaceContextValue<T>
- Returns:
-
asOptional
Description copied from interface:ContextValue
Get this value as an optional.- Specified by:
asOptional
in interfaceContextValue<T>
- Returns:
-
update
Description copied from interface:ContextValue
Update the value in the context.- Specified by:
update
in interfaceContextValue<T>
-
clear
public void clear()Description copied from interface:ContextValue
Clear the value.- Specified by:
clear
in interfaceContextValue<T>
-