/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it before <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert before * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeBefore(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node with the specified object as its * <code>value</code> and inserts it after <code>node</code>. * <p> * This implementation uses {@link #createNode(Object)} and * {@link #addNode(AbstractLinkedList.Node,AbstractLinkedList.Node)}. * * @param node node to insert after * @param value value of the newly added node * @throws NullPointerException if <code>node</code> is null */ protected void addNodeAfter(Node node, Object value) { Node newNode = createNode(value); addNode(newNode, node.next); }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }
/** * Creates a new node, either by reusing one from the cache or creating * a new one. * * @param value value of the new node * @return the newly created node */ protected Node createNode(Object value) { Node cachedNode = getNodeFromCache(); if (cachedNode == null) { return super.createNode(value); } else { cachedNode.setValue(value); return cachedNode; } }