public class ConstantAmountManager extends Object implements AmountManager
Constructor and Description |
---|
ConstantAmountManager(long constantAmount) |
Modifier and Type | Method and Description |
---|---|
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.
|
public long getAmount(int species)
AmountManager
getAmount
in interface AmountManager
species
- index of the speciespublic void performReaction(int reaction, int times)
AmountManager
RuntimeException
is thrown.performReaction
in interface AmountManager
reaction
- the index of the reaction firedtimes
- the number of firingspublic void resetAmount()
AmountManager
AnnotationManager
. This is called whenever a Simulator
is started.resetAmount
in interface AmountManager
public void rollback()
AmountManager
rollback
in interface AmountManager
public void save()
AmountManager
save
in interface AmountManager
public void setAmount(int species, long amount)
AmountManager
setAmount
in interface AmountManager
species
- index of the speciesCopyright © 2007–2021. All rights reserved.