Package de.xima.fc.common.value
Interface IValueAccessor<V>
-
- Type Parameters:
V- The type of the value
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
JsonParametersValueAccessor,PromptTestValueAccessor
public interface IValueAccessor<V> extends Serializable
Interface for accessing a value, combining a getter and a setter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Vget()Gets the value.booleanhasValue()Checks if a value is present.voidremoveValue()Removes the value (so thathasValue()returns false).voidset(V value)Sets the value.
-
-
-
Method Detail
-
get
V get()
Gets the value. This will return null if no valueis present.- Returns:
- The value
-
hasValue
boolean hasValue()
Checks if a value is present.- Returns:
- true if a value is present, false otherwise
-
removeValue
void removeValue()
Removes the value (so thathasValue()returns false).
-
set
void set(V value)
Sets the value. This will makehasValue()return true.- Parameters:
value- The value to set
-
-