Package score

Interface VarDB<E>

  • Type Parameters:
    E - Variable type. It shall be readable and writable class.

    public interface VarDB<E>
    A variable DB holds one value.
    See Also:
    ObjectReader, ObjectWriter
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      E get()
      Returns the current value.
      E getOrDefault​(E defaultValue)
      Returns the current value or defaultValue if the current value is null.
      void set​(E value)
      Sets value.
    • Method Detail

      • set

        void set​(E value)
        Sets value.
        Parameters:
        value - new value
      • get

        E get()
        Returns the current value.
        Returns:
        current value
      • getOrDefault

        E getOrDefault​(E defaultValue)
        Returns the current value or defaultValue if the current value is null.
        Parameters:
        defaultValue - default value
        Returns:
        the current value or defaultValue if the current value is null.