Package org.serviceconnector.util
Class LinkedNode<T>
java.lang.Object
org.serviceconnector.util.LinkedNode<T>
- Type Parameters:
T- the generic type
The Class LinkedNode. Represents a node of the LinkedQueue construct.
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe next node in queue.The value of the node. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
value
The value of the node. -
next
The next node in queue.
-
-
Constructor Details
-
LinkedNode
Instantiates a LinkedNode.- Parameters:
value- the valuenext- the next
-
-
Method Details
-
getNext
Gets the next node.- Returns:
- the next node
-
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
-