public class RBeliefbase.RBeliefSet extends RElement implements IBeliefSet
Modifier and Type | Field and Description |
---|---|
protected ListWrapper<java.lang.Object> |
facts
The value.
|
Constructor and Description |
---|
RBeliefSet(MBelief modelelement,
IInternalAccess agent)
Create a new parameter.
|
RBeliefSet(MBelief modelelement,
IInternalAccess agent,
java.lang.Object vals)
Create a new parameter.
|
Modifier and Type | Method and Description |
---|---|
<T> void |
addBeliefSetListener(IBeliefListener<T> listener)
Add a belief set listener.
|
void |
addFact(java.lang.Object fact)
Add a fact to a belief.
|
void |
addFacts(java.lang.Object[] facts)
Add facts to a parameter set.
|
boolean |
containsFact(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.Object |
getFact(java.lang.Object oldval)
Get a value equal to the given object.
|
java.lang.Object[] |
getFacts()
Get the facts of a beliefset.
|
java.lang.String |
getName()
Get the name.
|
protected java.util.List<java.lang.Object> |
internalGetValues() |
void |
modified(java.lang.Object fact)
Indicate that the fact of this belief was modified.
|
<T> void |
removeBeliefSetListener(IBeliefListener<T> listener)
Remove a belief set listener.
|
void |
removeFact(java.lang.Object fact)
Remove a fact to a belief.
|
void |
removeFacts()
Remove all facts from a belief.
|
int |
size()
Get the number of values currently
contained in this set.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getModelElement
protected ListWrapper<java.lang.Object> facts
public RBeliefSet(MBelief modelelement, IInternalAccess agent, java.lang.Object vals)
modelelement
- The model element.name
- The name.vals
- The values as array, list, iterable...public RBeliefSet(MBelief modelelement, IInternalAccess agent)
modelelement
- The model element.name
- The name.protected java.util.List<java.lang.Object> evaluateValues()
public java.lang.String getName()
public void addFact(java.lang.Object fact)
addFact
in interface IBeliefSet
fact
- The new fact.public void removeFact(java.lang.Object fact)
removeFact
in interface IBeliefSet
fact
- The new fact.public void addFacts(java.lang.Object[] facts)
addFacts
in interface IBeliefSet
public void removeFacts()
removeFacts
in interface IBeliefSet
public java.lang.Object getFact(java.lang.Object oldval)
getFact
in interface IBeliefSet
oldval
- The old value.public boolean containsFact(java.lang.Object fact)
containsFact
in interface IBeliefSet
fact
- The fact to test.public java.lang.Object[] getFacts()
getFacts
in interface IBeliefSet
public int size()
size
in interface IBeliefSet
public java.lang.Class<?> getClazz()
getClazz
in interface IBeliefSet
public void modified(java.lang.Object fact)
modified
in interface IBeliefSet
public <T> void addBeliefSetListener(IBeliefListener<T> listener)
addBeliefSetListener
in interface IBeliefSet
listener
- The belief set listener.public <T> void removeBeliefSetListener(IBeliefListener<T> listener)
removeBeliefSetListener
in interface IBeliefSet
listener
- The belief set listener.protected java.util.List<java.lang.Object> internalGetValues()