Skip navigation links
Drools :: Core 7.33.0.Final-redhat-00002
org.drools.core.reteoo

Class ObjectSinkNodeList

    • Constructor Detail

      • ObjectSinkNodeList

        public ObjectSinkNodeList()
        Construct an empty LinkedList
    • Method Detail

      • add

        public void add(ObjectSinkNode node)
        Add a ObjectSinkNode to the list. If the LinkedList is empty then the first and last nodes are set to the added node.
        Parameters:
        node - The ObjectSinkNode to be added
      • remove

        public void remove(ObjectSinkNode node)
        Removes a ObjectSinkNode from the list. This works by attach the previous reference to the child reference. When the node to be removed is the first node it calls removeFirst(). When the node to be removed is the last node it calls removeLast().
        Parameters:
        node - The ObjectSinkNode to be removed.
      • getFirst

        public final ObjectSinkNode getFirst()
        Return the first node in the list
        Returns:
        The first ObjectSinkNode.
      • getLast

        public final ObjectSinkNode getLast()
        Return the last node in the list
        Returns:
        The last ObjectSinkNode.
      • removeFirst

        public ObjectSinkNode removeFirst()
        Remove the first node from the list. The next node then becomes the first node. If this is the last node then both first and last node references are set to null.
        Returns:
        The first ObjectSinkNode.
      • removeLast

        public ObjectSinkNode removeLast()
        Remove the last node from the list. The previous node then becomes the last node. If this is the last node then both first and last node references are set to null.
        Returns:
        The first ObjectSinkNode.
      • isEmpty

        public final boolean isEmpty()
        Returns:
        boolean value indicating the empty status of the list
      • clear

        public void clear()
        Iterates the list removing all the nodes until there are no more nodes to remove.
      • size

        public final int size()
        Returns:
        return size of the list as an int
      • iterator

        public Iterator iterator()
        Returns a list iterator
        Returns:
Drools :: Core 7.33.0.Final-redhat-00002

Copyright © 2001–2020 JBoss by Red Hat. All rights reserved.