/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue. * * This method can be used from any thread. * * @param value the element to be added; must not be null */ public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
/** * Add an element to the head of the queue, providing the queue node to be used. * * This method can be used from any thread. * * @param n the node containing the element to be added; both must not be null */ public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
public final void add(final T value) { final Node<T> n = new Node<T>(value); getAndSet(n).setNext(n); }
public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }
public final void addNode(final Node<T> n) { n.setNext(null); getAndSet(n).setNext(n); }