Class NewestReference<T extends java.lang.Comparable<T>>


  • public final class NewestReference<T extends java.lang.Comparable<T>>
    extends java.lang.Object
    Keeps the largest value in a thread safe way. Analogous to AtomicRefrence except that is utilizes the fact that its values are comparable to ensure that the value held never decreases.
    • Constructor Summary

      Constructors 
      Constructor Description
      NewestReference()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T get()  
      void update​(T newValue)  
      • Methods inherited from class java.lang.Object

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

      • NewestReference

        public NewestReference()
    • Method Detail

      • get

        public T get()
      • update

        public void update​(T newValue)