Class LinkedNode<T>

java.lang.Object
org.serviceconnector.util.LinkedNode<T>
Type Parameters:
T - the generic type

public class LinkedNode<T> extends Object
The Class LinkedNode. Represents a node of the LinkedQueue construct.
  • Field Details

    • value

      public T value
      The value of the node.
    • next

      public LinkedNode<T> next
      The next node in queue.
  • Constructor Details

    • LinkedNode

      public LinkedNode(T value, LinkedNode<T> next)
      Instantiates a LinkedNode.
      Parameters:
      value - the value
      next - the next
  • Method Details

    • getNext

      public LinkedNode<T> getNext()
      Gets the next node.
      Returns:
      the next node
    • getValue

      public T getValue()
      Gets the value of the node.
      Returns:
      the value of the node
    • isReferenced

      public boolean isReferenced()
      Checks if is referenced.
      Returns:
      true, if is referenced
    • reference

      public void reference()
      Increment reference counter.
    • dereference

      public void dereference()
      Decrement reference counter.
    • getReferenceCount

      public int getReferenceCount()
      Gets the reference count.
      Returns:
      the reference count