Package jmri

Class Reference<E>

  • Type Parameters:
    E - the type of the reference

    public class Reference<E>
    extends java.lang.Object
    A reference to an object. It's a faster replacement for AtomicReference when thread safety is not needed.
    • Constructor Summary

      Constructors 
      Constructor Description
      Reference()
      Create an instance of Reference.
      Reference​(E ref)
      Create an instance of Reference.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      E get()
      Return the reference.
      void set​(E ref)
      Set the reference.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait