component/src/main/java/org/wso2/extension/siddhi/execution/extrema/util/DoublyLinkedList.java
public void addBeforeFirst(ListNode<T> node) {
        node.setNextNode(head);
        node.setPreviousNode(null);
        if (size == 0) {
            tail = node;
        } else {
            head.setPreviousNode(node);
        }
        head = node;
        size++;
    }
/**
     * Add a node before the first node in the list
     *
     * @param node The node to be added as the first node of the list
     */
Add a node before the first node in the list
@param node The node to be added as the first node of the list
Add a node before the first node in the list @param node The node to be added as the first node of the list
public void addBeforeFirst(ListNode<T> node) {
        node.setNextNode(head);
        node.setPreviousNode(null);
        if (size == 0) {
            tail = node;
        } else {
            head.setPreviousNode(node);
        }
        head = node;
        size++;
    }
public void addBeforeFirst ( ListNode < T > node ) { node . setNextNode ( head ) ; node . setPreviousNode ( null ) ; if ( size == 0 ) { tail = node ; } else { head . setPreviousNode ( node ) ; } head = node ; size ++ ; }
Add a node before the first node in the list
 @param node The node to be added as the first node of the list
Add a node before the first node in the list @param node The node to be added as the first node of the list