Class ImmediateValue<T>

  • Type Parameters:
    T - the value type
    All Implemented Interfaces:
    Value<T>

    public final class ImmediateValue<T>
    extends java.lang.Object
    implements Value<T>
    A simple immediately-available value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private T value  
    • Constructor Summary

      Constructors 
      Constructor Description
      ImmediateValue​(T value)
      Construct a new instance.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T getValue()
      Get the actual value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • value

        private final T value
    • Constructor Detail

      • ImmediateValue

        public ImmediateValue​(T value)
        Construct a new instance.
        Parameters:
        value - the value to return
    • Method Detail

      • getValue

        public T getValue()
        Get the actual value.
        Specified by:
        getValue in interface Value<T>
        Returns:
        the actual value