Class MarkedReference<T>

  • Type Parameters:
    T - the type of the reference

    public class MarkedReference<T>
    extends java.lang.Object
    Immutable, non-volatile, non-atomic version of AtomicMarkableReference.
    • Constructor Summary

      Constructors 
      Constructor Description
      MarkedReference​(T reference, boolean marked)  
    • Method Summary

      Modifier and Type Method Description
      static <S> MarkedReference<S> empty()  
      T getReference()  
      boolean isMarked()  
      • Methods inherited from class java.lang.Object

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

      • MarkedReference

        public MarkedReference​(T reference,
                               boolean marked)
    • Method Detail

      • empty

        public static <S> MarkedReference<S> empty()
        Type Parameters:
        S - the type of the null reference
        Returns:
        a null-reference, non-marked instance
      • getReference

        public T getReference()
      • isMarked

        public boolean isMarked()