Class Holder<T>

  • Type Parameters:
    T - the type of value held by this Holder

    public class Holder<T>
    extends java.lang.Object
    Holder of an object.
    Since:
    4.3
    • Field Summary

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

      Constructors 
      Constructor Description
      Holder​(T value)
      Constructor for Holder.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()
      Get the value held by this Holder
      void set​(T value)
      Set a new value held by this Holder
      • Methods inherited from class java.lang.Object

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

      • value

        private T value
    • Constructor Detail

      • Holder

        public Holder​(T value)

        Constructor for Holder.

        Parameters:
        value - is the initial value that is set(Object)
    • Method Detail

      • get

        public T get()
        Get the value held by this Holder
        Returns:
        the value held by this Holder
      • set

        public void set​(T value)
        Set a new value held by this Holder
        Parameters:
        value - to be set as new value held by this Holder