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

    Modifier and Type
    Method
    Description
    get()
    Gets the value.
    boolean
    Checks if a value is present.
    void
    Removes the value (so that hasValue() returns false).
    void
    set(V value)
    Sets the value.
  • Method Details

    • get

      V get()
      Gets the value. This will return null if no value is 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 that hasValue() returns false).
    • set

      void set(V value)
      Sets the value. This will make hasValue() return true.
      Parameters:
      value - The value to set