Interface Export<T>
-
- Type Parameters:
T- the export type
public interface Export<T>A namespaced value wrapper.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceExport.Pointer<T>A pointer to the value of an export.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclear()Clears the exportExport<T>computeIfAbsent(Supplier<? extends T> other)Uses the provided function to compute a value if one isn't already present.booleancontainsValue()Gets if this export has a valueTget()Gets the current value of the exportTget(T other)Gets the current value of the export, or returns the other if a value isn't present.Stringname()Gets the name of the exportExport.Pointer<T>pointer()Returns a pointer to this exportExport<T>put(T value)Sets the value of the exportExport<T>putIfAbsent(T value)Sets the value of the export if a value isn't already present, then returns the export
-
-
-
Method Detail
-
name
String name()
Gets the name of the export- Returns:
- the name
-
pointer
Export.Pointer<T> pointer()
Returns a pointer to this export- Returns:
- a pointer
-
get
T get()
Gets the current value of the export- Returns:
- the current value
-
get
T get(T other)
Gets the current value of the export, or returns the other if a value isn't present.- Parameters:
other- the other value- Returns:
- the value
-
put
Export<T> put(T value)
Sets the value of the export- Parameters:
value- the value to set- Returns:
- this
-
putIfAbsent
Export<T> putIfAbsent(T value)
Sets the value of the export if a value isn't already present, then returns the export- Parameters:
value- the value to set if absent- Returns:
- this
-
computeIfAbsent
Export<T> computeIfAbsent(Supplier<? extends T> other)
Uses the provided function to compute a value if one isn't already present.- Parameters:
other- the other value- Returns:
- the value
-
containsValue
boolean containsValue()
Gets if this export has a value- Returns:
- true if this export has a value
-
clear
void clear()
Clears the export
-
-