Class SerializableScopedValue<C,​V>

  • Type Parameters:
    C - context type parameter
    V - type parameter
    All Implemented Interfaces:
    java.io.Serializable

    public final class SerializableScopedValue<C,​V>
    extends java.lang.Object
    implements java.io.Serializable
    A value that holds a Serializable value and scopes its value to given context.
    See Also:
    Serialized Form
    • Constructor Detail

      • SerializableScopedValue

        public SerializableScopedValue​(Factory<V> what)
      • SerializableScopedValue

        public SerializableScopedValue​(C context,
                                       V value)
    • Method Detail

      • get

        public V get​(C context)
      • reset

        public void reset​(C context)
        Clear reference for given context and reinitialize it when accessed again.
        Parameters:
        context - context type parameter
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object