public interface CogxelState extends java.lang.Iterable<Cogxel>, CloneableSerializable
Modifier and Type | Method and Description |
---|---|
void |
addCogxel(Cogxel cogxel)
Adds a Cogxel to the state, overriding the existing Cogxel, if it
exists.
|
CogxelState |
clone()
Clones this Cogxel state, returning a deep copy of the Cogxels.
|
Cogxel |
getCogxel(SemanticIdentifier identifier)
Gets a Cogxel from the state, if it has been previously added.
|
double |
getCogxelActivation(SemanticIdentifier identifier)
Gets the activation level of a Cogxel in the CogxelState.
|
java.util.Collection<Cogxel> |
getCogxels()
Gets the Cogxels that have been previously added to this CogxelState.
|
int |
getNumCogxels()
Gets the number of existing Cogxels in this CogxelState.
|
Cogxel |
getOrCreateCogxel(SemanticIdentifier identifier,
CogxelFactory factory)
Attempts to get an existing Cogxel for a given SemanticIdentifier.
|
boolean |
hasCogxel(SemanticIdentifier identifier)
Returns true if there is an existing Cogxel for the given identifier and
false otherwise.
|
boolean |
removeCogxel(Cogxel cogxel)
Removes a Cogxel from the CogxelState, if it exists.
|
boolean |
removeCogxel(SemanticIdentifier identifier)
Removes a Cogxel from the state, if it exists.
|
void addCogxel(Cogxel cogxel)
cogxel
- The Cogxel to add.java.lang.IllegalArgumentException
- If an invalid Cogxel is given.boolean hasCogxel(SemanticIdentifier identifier)
identifier
- The identifier to look for the Cogxel.Cogxel getCogxel(SemanticIdentifier identifier)
identifier
- The SemanticIdentifier for the Cogxel.java.lang.IllegalArgumentException
- If an invalid identifier is given.Cogxel getOrCreateCogxel(SemanticIdentifier identifier, CogxelFactory factory)
identifier
- The identifier to get or create a Cogxel for.factory
- The factory to use to create the Cogxel is one does not
already exist for the identifier.java.lang.IllegalArgumentException
- If an invalid identifier is given.java.lang.NullPointerException
- If an invalid factory is given.boolean removeCogxel(SemanticIdentifier identifier)
identifier
- The SemanticIdentifier of the Cogxel to remove.java.lang.IllegalArgumentException
- If an invalid identifier is given.boolean removeCogxel(Cogxel cogxel)
cogxel
- The Cogxel to remove.java.lang.IllegalArgumentException
- If an invalid Cogxel is given.double getCogxelActivation(SemanticIdentifier identifier)
identifier
- The SemanticIdentifier for the Cogxel to get the
activation level of.java.lang.IllegalArgumentException
- If an invalid identifier is given.java.util.Collection<Cogxel> getCogxels()
int getNumCogxels()
CogxelState clone()
clone
in interface CloneableSerializable