Package jadex.bdiv3x.runtime
Class RBeliefbase.RBeliefSet
- java.lang.Object
- 
- jadex.bdiv3.runtime.impl.RElement
- 
- jadex.bdiv3x.runtime.RBeliefbase.RBeliefSet
 
 
- 
- All Implemented Interfaces:
- IBeliefSet,- IElement
 - Enclosing class:
- RBeliefbase
 
 public class RBeliefbase.RBeliefSet extends jadex.bdiv3.runtime.impl.RElement implements IBeliefSet 
- 
- 
Field SummaryFields Modifier and Type Field Description protected ListWrapper<java.lang.Object>factsThe value.
 - 
Constructor SummaryConstructors Constructor Description RBeliefSet(MBelief modelelement, IInternalAccess agent)Create a new parameter.RBeliefSet(MBelief modelelement, IInternalAccess agent, java.lang.Object vals)Create a new parameter.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> voidaddBeliefSetListener(IBeliefListener<T> listener)Add a belief set listener.voidaddFact(java.lang.Object fact)Add a fact to a belief.voidaddFacts(java.lang.Object[] facts)Add facts to a parameter set.booleancontainsFact(java.lang.Object fact)Test if a fact is contained in a belief.protected java.util.List<java.lang.Object>evaluateValues()Evaluate the default values.java.lang.Class<?>getClazz()Get the value class.java.lang.ObjectgetFact(java.lang.Object oldval)Get a value equal to the given object.java.lang.Object[]getFacts()Get the facts of a beliefset.java.lang.StringgetName()Get the name.protected java.util.List<java.lang.Object>internalGetValues()voidmodified(java.lang.Object fact)Indicate that the fact of this belief was modified.<T> voidremoveBeliefSetListener(IBeliefListener<T> listener)Remove a belief set listener.voidremoveFact(java.lang.Object fact)Remove a fact to a belief.voidremoveFacts()Remove all facts from a belief.intsize()Get the number of values currently contained in this set.- 
Methods inherited from class jadex.bdiv3.runtime.impl.RElementgetAgent, getCapability, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface jadex.bdiv3x.runtime.IElementgetModelElement
 
- 
 
- 
- 
- 
Field Detail- 
factsprotected ListWrapper<java.lang.Object> facts The value.
 
- 
 - 
Constructor Detail- 
RBeliefSetpublic RBeliefSet(MBelief modelelement, IInternalAccess agent, java.lang.Object vals) Create a new parameter.- Parameters:
- modelelement- The model element.
- name- The name.
- vals- The values as array, list, iterable...
 
 - 
RBeliefSetpublic RBeliefSet(MBelief modelelement, IInternalAccess agent) Create a new parameter.- Parameters:
- modelelement- The model element.
- name- The name.
 
 
- 
 - 
Method Detail- 
evaluateValuesprotected java.util.List<java.lang.Object> evaluateValues() Evaluate the default values.
 - 
getNamepublic java.lang.String getName() Get the name.- Returns:
- The name
 
 - 
addFactpublic void addFact(java.lang.Object fact) Add a fact to a belief.- Specified by:
- addFactin interface- IBeliefSet
- Parameters:
- fact- The new fact.
 
 - 
removeFactpublic void removeFact(java.lang.Object fact) Remove a fact to a belief.- Specified by:
- removeFactin interface- IBeliefSet
- Parameters:
- fact- The new fact.
 
 - 
addFactspublic void addFacts(java.lang.Object[] facts) Add facts to a parameter set.- Specified by:
- addFactsin interface- IBeliefSet
 
 - 
removeFactspublic void removeFacts() Remove all facts from a belief.- Specified by:
- removeFactsin interface- IBeliefSet
 
 - 
getFactpublic java.lang.Object getFact(java.lang.Object oldval) Get a value equal to the given object.- Specified by:
- getFactin interface- IBeliefSet
- Parameters:
- oldval- The old value.
 
 - 
containsFactpublic boolean containsFact(java.lang.Object fact) Test if a fact is contained in a belief.- Specified by:
- containsFactin interface- IBeliefSet
- Parameters:
- fact- The fact to test.
- Returns:
- True, if fact is contained.
 
 - 
getFactspublic java.lang.Object[] getFacts() Get the facts of a beliefset.- Specified by:
- getFactsin interface- IBeliefSet
- Returns:
- The facts.
 
 - 
sizepublic int size() Get the number of values currently contained in this set.- Specified by:
- sizein interface- IBeliefSet
- Returns:
- The values count.
 
 - 
getClazzpublic java.lang.Class<?> getClazz() Get the value class.- Specified by:
- getClazzin interface- IBeliefSet
- Returns:
- The valuec class.
 
 - 
modifiedpublic void modified(java.lang.Object fact) Indicate that the fact of this belief was modified. Calling this method causes an internal fact changed event that might cause dependent actions.- Specified by:
- modifiedin interface- IBeliefSet
 
 - 
addBeliefSetListenerpublic <T> void addBeliefSetListener(IBeliefListener<T> listener) Add a belief set listener.- Specified by:
- addBeliefSetListenerin interface- IBeliefSet
- Parameters:
- listener- The belief set listener.
 
 - 
removeBeliefSetListenerpublic <T> void removeBeliefSetListener(IBeliefListener<T> listener) Remove a belief set listener.- Specified by:
- removeBeliefSetListenerin interface- IBeliefSet
- Parameters:
- listener- The belief set listener.
 
 - 
internalGetValuesprotected java.util.List<java.lang.Object> internalGetValues() 
 
- 
 
-