public abstract class Psystem
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
static java.util.Collection<? extends Membrane> |
emptyMembranes |
Constructor and Description |
---|
Psystem()
The constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
addRule(IRule r)
adds a rule to the existing rule set
|
java.util.Iterator<AlphabetObject> |
alphabetIterator()
Returns an iterator over the alphabet
|
ISimulator |
createSimulator(boolean stepBackSupported,
boolean alternativeStepsSupported)
Creates a simulator to simulate this P-system.
|
ISimulator |
createSimulator(boolean stepBackSupported,
boolean alternativeStepsSupported,
java.lang.String id)
Creates a simulator to simulate this P-system.
|
IPsystemFactory |
getAbstractPsystemFactory()
Gets the current AbstractPsystemFactory instance
|
java.util.SortedSet<AlphabetObject> |
getAlphabet()
Returns the P-system alphabet
|
Configuration |
getFirstConfiguration() |
MultiSet<java.lang.String> |
getFirstMultiSet() |
java.util.Map<java.lang.String,MultiSet<java.lang.String>> |
getInitialMultiSets()
Returns the initial P-system multisets
|
MembraneStructure |
getMembraneStructure() |
RulesSet |
getRules() |
MultiSet<java.lang.String> |
getSecondMultiSet() |
java.util.Iterator<java.lang.String> |
getSimulatorsIDs()
Gets an iterator on all possible simulators IDs for the Psystem
|
void |
setAbstractPsystemFactory(IPsystemFactory apf)
Sets an specific instance of PsystemFactotyInterface as the current
factory to be used
|
void |
setFirstMultiSet(MultiSet<java.lang.String> firstMultiSet) |
void |
setMembraneStructure(MembraneStructure membraneStructure) |
void |
setRules(RulesSet rules) |
void |
setSecondMultiSet(MultiSet<java.lang.String> secondMultiSet) |
boolean |
supportsAlternativeStep(java.lang.String id)
Returns a boolean representing if the simulator related to id could be
created capable of performing alternative steps
|
java.lang.String |
toString() |
public static final transient java.util.Collection<? extends Membrane> emptyMembranes
public void setAbstractPsystemFactory(IPsystemFactory apf) throws PlinguaCoreException
apf
- the PsystemFactoryInterface instance to be heldPlinguaCoreException
- if any error ocurred during the instantiation of the
CreateSimulator instancepublic MultiSet<java.lang.String> getFirstMultiSet()
public void setFirstMultiSet(MultiSet<java.lang.String> firstMultiSet)
public MultiSet<java.lang.String> getSecondMultiSet()
public void setSecondMultiSet(MultiSet<java.lang.String> secondMultiSet)
public void setRules(RulesSet rules)
public IPsystemFactory getAbstractPsystemFactory()
public java.util.Map<java.lang.String,MultiSet<java.lang.String>> getInitialMultiSets()
public java.util.SortedSet<AlphabetObject> getAlphabet()
public java.util.Iterator<AlphabetObject> alphabetIterator()
public RulesSet getRules()
public boolean addRule(IRule r)
r
- the rule to be addedpublic Configuration getFirstConfiguration()
public java.lang.String toString()
toString
in class java.lang.Object
public ISimulator createSimulator(boolean stepBackSupported, boolean alternativeStepsSupported, java.lang.String id) throws PlinguaCoreException
stepBackSupported
- sets if the simulator created supports steps backalternativeStepsSupported
- sets if the simulator created supports alternate stepsid
- the Simulator id which references the specific Simulator class
to be instantiatedPlinguaCoreException
- if there are rules which doesn't match the model
specification previously defined by setting the
AbstractPsystemFactory instancepublic ISimulator createSimulator(boolean stepBackSupported, boolean alternativeStepsSupported) throws PlinguaCoreException
stepBackSupported
- sets if the simulator created supports steps backalternativeStepsSupported
- sets if the simulator created supports alternate stepsPlinguaCoreException
- if there are rules which doesn't match the model
specification previously defined by setting the
AbstractPsystemFactory instancepublic java.util.Iterator<java.lang.String> getSimulatorsIDs() throws PlinguaCoreException
PlinguaCoreException
- if the simulators IDs provider hasn't set yetpublic boolean supportsAlternativeStep(java.lang.String id) throws PlinguaCoreException
id
- the simulator identifierPlinguaCoreException
- if the simulators IDs provider hasn't set yetpublic MembraneStructure getMembraneStructure()
public void setMembraneStructure(MembraneStructure membraneStructure)