K - the type of the belief name or key.V - the type of the belief set values.public abstract class AbstractBeliefSet<K,V> extends AbstractBelief<K,java.util.Set<V>> implements BeliefSet<K,V>
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| Constructor and Description |
|---|
AbstractBeliefSet()
The default constructor.
|
AbstractBeliefSet(K name)
Initializes a belief set with its name.
|
AbstractBeliefSet(K name,
java.util.Set<V> values)
Initializes a belief set with its name and an initial set of values.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
addSetValue(V value)
Adds a value of this belief set.
|
void |
addValue(V value)
Adds a value to the belief set and notifies belief bases of the addition
of this value.
|
protected abstract boolean |
removeSetValue(V value)
Removes a value of this belief set.
|
boolean |
removeValue(V value)
Removes a value of the belief set and notifies belief bases of the
removal of this value.
|
addBeliefBase, clone, equals, getBeliefBases, getName, hashCode, notifyBeliefBases, removeBeliefBase, setName, setValue, toString, updateValuegetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadatafinalize, getClass, notify, notifyAll, wait, wait, waitaddBeliefBase, clone, getBeliefBases, getName, getValue, removeBeliefBase, setValuegetMetadata, getMetadata, hasMetadata, putMetadata, removeMetadatapublic AbstractBeliefSet()
public AbstractBeliefSet(K name)
name - the name of this belief set.protected abstract void addSetValue(V value)
addValue(Object) method.value - the value to be added.public final void addValue(V value)
addValue in interface BeliefSet<K,V>value - the value to be added.BeliefSet.addValue(Object)protected abstract boolean removeSetValue(V value)
removeValue(Object) method.value - the value to be added.public final boolean removeValue(V value)
removeValue in interface BeliefSet<K,V>value - the value to be removed.BeliefSet.removeValue(Object)