Package jmri

Class ReferenceNotNull<E>

  • Type Parameters:
    E - the type of the reference

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

      Constructors 
      Constructor Description
      ReferenceNotNull()
      Create an instance of Reference.
      ReferenceNotNull​(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