Class MutableReference<T>

  • Type Parameters:
    T - referenced object type

    public class MutableReference<T>
    extends java.lang.Object
    Mutable container of an object reference.
    Since:
    Jet 3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      MutableReference()
      Creates a new instance with a null value.
      MutableReference​(T value)
      Creates a new instance with the specified value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      T get()
      Returns the current value.
      int hashCode()  
      boolean isNull()
      Tells whether the current value is null.
      MutableReference set​(T value)
      Sets the value as given.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MutableReference

        public MutableReference()
        Creates a new instance with a null value.
      • MutableReference

        public MutableReference​(T value)
        Creates a new instance with the specified value.
    • Method Detail

      • get

        public T get()
        Returns the current value.
      • isNull

        public boolean isNull()
        Tells whether the current value is null.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

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