Interface AdaptedValue<S,​O,​V>

  • Type Parameters:
    S - storage type
    O - output type
    V - value type
    All Superinterfaces:
    Adaptable<O,​V>, Getter<S,​V>, Setter<S,​V>, Value<S,​V>
    All Known Subinterfaces:
    DefaultAdaptedValue<S,​O,​V>

    public interface AdaptedValue<S,​O,​V>
    extends Adaptable<O,​V>, Value<S,​V>
    A value that must be adapted to and from storage.
    • Method Summary

      Static Methods 
      Modifier and Type Method Description
      static <S,​O,​V>
      AdaptedValue<S,​O,​V>
      of​(Adapter<O,​V> adapter, Value<S,​O> value)
      Creates a new AdaptedValue by delegating to the provided arguments.
      • Methods inherited from interface com.rezzedup.util.valuables.Getter

        get
      • Methods inherited from interface com.rezzedup.util.valuables.Setter

        remove, set
    • Method Detail

      • of

        static <S,​O,​V> AdaptedValue<S,​O,​V> of​(Adapter<O,​V> adapter,
                                                                      Value<S,​O> value)
        Creates a new AdaptedValue by delegating to the provided arguments. Getting the value will always deserialize from storage, and setting the value will always serialize into storage.
        Type Parameters:
        S - storage type
        O - output type
        V - value type
        Parameters:
        adapter - the adapter
        value - an existing value implementation that gets and sets the value from storage in the original 'output' type
        Returns:
        a new instance composed of the arguments