/** * Removes the first element of this queue if any * @return the value of the first element of the queue, null if empty */ public final T poll() { final Node<T> n = pollNode(); return (n != null) ? n.value : null; }
/** * Removes the first element of this queue if any * @return the value of the first element of the queue, null if empty */ public final T poll() { final Node<T> n = pollNode(); return (n != null) ? n.value : null; }
/** * Removes the first element of this queue if any * @return the value of the first element of the queue, null if empty */ public final T poll() { final Node<T> n = pollNode(); return (n != null) ? n.value : null; }