|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfern.network.DefaultAmountManager
public class DefaultAmountManager
Default implementation of an amount manager, that stores the amounts in arrays.
Constructor Summary | |
---|---|
DefaultAmountManager(Network net)
Creates an AmountManager for a given network |
Method Summary | |
---|---|
long |
getAmount(int species)
Gets the current amount of a species. |
void |
performReaction(int reaction,
int times)
Reflects a (multiple) firing of a reaction by adjusting the populations of the reactants and the products. |
void |
resetAmount()
Resets the amount of each species to the initial amount retrieved by the networks AnnotationManager . |
void |
rollback()
Restore the amount array from the recently saved one. |
void |
save()
Makes a copy of the amount array. |
void |
setAmount(int species,
long amount)
Sets the current amount of a species. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultAmountManager(Network net)
AmountManager
for a given network
net
- the networkMethod Detail |
---|
public void performReaction(int reaction, int times)
RuntimeException
is thrown.
performReaction
in interface AmountManager
reaction
- the index of the reaction firedtimes
- the number of firingspublic long getAmount(int species)
getAmount
in interface AmountManager
species
- index of the species
public void setAmount(int species, long amount)
setAmount
in interface AmountManager
species
- index of the speciespublic void resetAmount()
AnnotationManager
. This is called whenever a Simulator
is started.
resetAmount
in interface AmountManager
public void save()
save
in interface AmountManager
public void rollback()
rollback
in interface AmountManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |