Drools :: Core 6.2.0.Final

org.drools.core.beliefsystem.jtms
Class JTMSBeliefSetImpl<M extends JTMSMode<M>>

java.lang.Object
  extended by org.drools.core.util.LinkedList<M>
      extended by org.drools.core.beliefsystem.jtms.JTMSBeliefSetImpl<M>
All Implemented Interfaces:
Externalizable, Serializable, BeliefSet<M>, JTMSBeliefSet<M>

public class JTMSBeliefSetImpl<M extends JTMSMode<M>>
extends LinkedList<M>
implements JTMSBeliefSet<M>

See Also:
Serialized Form

Nested Class Summary
static class JTMSBeliefSetImpl.MODE
           
 
Nested classes/interfaces inherited from class org.drools.core.util.LinkedList
LinkedList.JavaUtilIterator<T extends LinkedListNode<T>>, LinkedList.LinkedListFastIterator, LinkedList.LinkedListIterator<T extends LinkedListNode<T>>
 
Field Summary
 
Fields inherited from class org.drools.core.util.LinkedList
fastIterator
 
Constructor Summary
JTMSBeliefSetImpl(BeliefSystem<M> beliefSystem, InternalFactHandle rootHandle)
           
 
Method Summary
 void add(M node)
          Add a LinkedListNode to the list.
 void cancel(PropagationContext context)
          This will remove all entries and do clean up, like retract FHs.
 void clear(PropagationContext context)
          This will remove all entries, but not do cleanup, the FH is most likely needed else where
 BeliefSystem getBeliefSystem()
           
 InternalFactHandle getFactHandle()
           
 InternalFactHandle getNegativeFactHandle()
           
 InternalFactHandle getPositiveFactHandle()
           
 WorkingMemoryAction getWorkingMemoryAction()
           
 boolean isConflicting()
           
 boolean isNegated()
           
 boolean isPositive()
           
 boolean isUndecided()
           
 void remove(M node)
          Removes a LinkedListNode from the list.
 void setNegativeFactHandle(InternalFactHandle negativeFactHandle)
           
 void setPositiveFactHandle(InternalFactHandle positiveFactHandle)
           
 void setWorkingMemoryAction(WorkingMemoryAction wmAction)
           
 
Methods inherited from class org.drools.core.util.LinkedList
addFirst, addLast, clear, contains, equals, fastIterator, get, getFirst, getLast, hashCode, insertAfter, isEmpty, iterator, javaUtilIterator, readExternal, removeFirst, removeLast, size, writeExternal
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.core.beliefsystem.jtms.JTMSBeliefSet
getLast
 
Methods inherited from interface org.drools.core.beliefsystem.BeliefSet
getFirst, isEmpty, iterator, size
 

Constructor Detail

JTMSBeliefSetImpl

public JTMSBeliefSetImpl(BeliefSystem<M> beliefSystem,
                         InternalFactHandle rootHandle)
Method Detail

getPositiveFactHandle

public InternalFactHandle getPositiveFactHandle()
Specified by:
getPositiveFactHandle in interface JTMSBeliefSet<M extends JTMSMode<M>>

setPositiveFactHandle

public void setPositiveFactHandle(InternalFactHandle positiveFactHandle)
Specified by:
setPositiveFactHandle in interface JTMSBeliefSet<M extends JTMSMode<M>>

getNegativeFactHandle

public InternalFactHandle getNegativeFactHandle()
Specified by:
getNegativeFactHandle in interface JTMSBeliefSet<M extends JTMSMode<M>>

setNegativeFactHandle

public void setNegativeFactHandle(InternalFactHandle negativeFactHandle)
Specified by:
setNegativeFactHandle in interface JTMSBeliefSet<M extends JTMSMode<M>>

add

public void add(M node)
Description copied from class: LinkedList
Add a LinkedListNode to the list. If the LinkedList is empty then the first and last nodes are set to the added node.

Specified by:
add in interface BeliefSet<M extends JTMSMode<M>>
Overrides:
add in class LinkedList<M extends JTMSMode<M>>
Parameters:
node - The LinkedListNode to be added

remove

public void remove(M node)
Description copied from class: LinkedList
Removes a LinkedListNode 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().

Specified by:
remove in interface BeliefSet<M extends JTMSMode<M>>
Overrides:
remove in class LinkedList<M extends JTMSMode<M>>
Parameters:
node - The LinkedListNode to be removed.

getBeliefSystem

public BeliefSystem getBeliefSystem()
Specified by:
getBeliefSystem in interface BeliefSet<M extends JTMSMode<M>>

getFactHandle

public InternalFactHandle getFactHandle()
Specified by:
getFactHandle in interface BeliefSet<M extends JTMSMode<M>>

isNegated

public boolean isNegated()
Specified by:
isNegated in interface BeliefSet<M extends JTMSMode<M>>

isUndecided

public boolean isUndecided()
Specified by:
isUndecided in interface BeliefSet<M extends JTMSMode<M>>

isConflicting

public boolean isConflicting()
Specified by:
isConflicting in interface BeliefSet<M extends JTMSMode<M>>

isPositive

public boolean isPositive()
Specified by:
isPositive in interface BeliefSet<M extends JTMSMode<M>>

cancel

public void cancel(PropagationContext context)
Description copied from interface: BeliefSet
This will remove all entries and do clean up, like retract FHs.

Specified by:
cancel in interface BeliefSet<M extends JTMSMode<M>>

clear

public void clear(PropagationContext context)
Description copied from interface: BeliefSet
This will remove all entries, but not do cleanup, the FH is most likely needed else where

Specified by:
clear in interface BeliefSet<M extends JTMSMode<M>>

setWorkingMemoryAction

public void setWorkingMemoryAction(WorkingMemoryAction wmAction)
Specified by:
setWorkingMemoryAction in interface BeliefSet<M extends JTMSMode<M>>

getWorkingMemoryAction

public WorkingMemoryAction getWorkingMemoryAction()

Drools :: Core 6.2.0.Final

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.