T - the type of the belief set values.public abstract class AbstractBeliefSet<T> extends AbstractBelief<java.util.Set<T>> implements BeliefSet<T>
BeliefSet interface,
and extends the AbstractBeliefSet class, parameterizing it with a
parameterized Set. It implements some of the interface methods,
leaving some implementations to the subclasses, mainly the choice of how the
belief set values are stored.metadata| Modifier | Constructor and Description |
|---|---|
protected |
AbstractBeliefSet()
The default constructor.
|
|
AbstractBeliefSet(java.lang.String name)
Initializes a belief set with its name.
|
|
AbstractBeliefSet(java.lang.String name,
java.util.Set<T> values)
Initializes a belief set with its name and an initial set of values.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addSetValue(T value)
Adds a value of this belief set.
|
void |
addValue(T value)
Adds a value to the belief set and notifies belief bases of the addition
of this value.
|
protected abstract boolean |
removeSetValue(T value)
Removes a value of this belief set.
|
boolean |
removeValue(T value)
Removes a value of the belief set and notifies belief bases of the
removal of this value.
|
addBeliefBase, equals, getBeliefBases, getName, hashCode, notifyBeliefBases, removeBeliefBase, setName, setValue, toString, updateValuegetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadataclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddBeliefBase, getBeliefBases, getName, getValue, removeBeliefBase, setValuegetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadataprotected AbstractBeliefSet()
public AbstractBeliefSet(java.lang.String name)
name - the name of this belief set.public AbstractBeliefSet(java.lang.String name,
java.util.Set<T> values)
name - the name of the belief set.values - the initial values of this belief set.protected abstract void addSetValue(T value)
addValue(Object) method.value - the value to be added.public final void addValue(T value)
addValue in interface BeliefSet<T>value - the value to be added.BeliefSet.addValue(Object)protected abstract boolean removeSetValue(T value)
removeValue(Object) method.value - the value to be added.public final boolean removeValue(T value)
removeValue in interface BeliefSet<T>value - the value to be removed.BeliefSet.removeValue(Object)