component/src/main/java/org/wso2/extension/siddhi/execution/extrema/util/DoublyLinkedList.java
public void addAfterNode(ListNode<T> node, ListNode<T> newNode) {
        newNode.setNextNode(node.getNextNode());
        newNode.setPreviousNode(node);
        node.setNextNode(newNode);
        if (newNode.getNextNode() == null) {
            tail = newNode;
        } else {
            newNode.getNextNode().setPreviousNode(newNode);
        }
        size++;
    }
/**
     * Add a node  after the node specified
     *
     * @param node    The node after which the new node should be added
     * @param newNode The node to be added
     */
Add a node  after the node specified
@param node    The node after which the new node should be added
@param newNode The node to be added
Add a node after the node specified @param node The node after which the new node should be added @param newNode The node to be added
public void addAfterNode(ListNode<T> node, ListNode<T> newNode) {
        newNode.setNextNode(node.getNextNode());
        newNode.setPreviousNode(node);
        node.setNextNode(newNode);
        if (newNode.getNextNode() == null) {
            tail = newNode;
        } else {
            newNode.getNextNode().setPreviousNode(newNode);
        }
        size++;
    }
public void addAfterNode ( ListNode < T > node , ListNode < T > newNode ) { newNode . setNextNode ( node . getNextNode ( ) ) ; newNode . setPreviousNode ( node ) ; node . setNextNode ( newNode ) ; if ( newNode . getNextNode ( ) == null ) { tail = newNode ; } else { newNode . getNextNode ( ) . setPreviousNode ( newNode ) ; } size ++ ; }
Add a node  after the node specified
 @param node    The node after which the new node should be added
 @param newNode The node to be added
Add a node after the node specified @param node The node after which the new node should be added @param newNode The node to be added