|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.biology.lsystems.fixed.Rule
public class Rule
To represent a rule of an LSystem containing a predecessor a successor and a probability this class may be used.
| Constructor Summary | |
|---|---|
Rule(char strPredecessor,
java.lang.String strSuccessor)
Constructor initializes predecessor and successor. |
|
Rule(char strPredecessor,
java.lang.String strSuccessor,
float fProbability)
Constructor allowing to initialize all three values |
|
| Method Summary | |
|---|---|
char |
getPredecessor()
Returns the predecessor value of this rule. |
float |
getProbability()
Returns the probability of this rule. |
java.lang.String |
getSuccessor()
Returns the successor value of this rule |
void |
setPredecessor(char strPredecessor)
Stores a new predecessor in the member variable. |
void |
setProbability(float fProbability)
Stores a new probability in the member variable. |
void |
setSuccessor(java.lang.String strSuccessor)
Stores a new sucessor in the member variable. |
java.lang.String |
toString()
Converts the rule to a string version and returns it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Rule(char strPredecessor,
java.lang.String strSuccessor,
float fProbability)
strPredecessor - The predecessor of this rule.strSuccessor - The successor of the rule.fProbability - The probability of the stochastic rule.
public Rule(char strPredecessor,
java.lang.String strSuccessor)
strPredecessor - The predecessor of this rule.strSuccessor - The successor of the rule.| Method Detail |
|---|
public void setPredecessor(char strPredecessor)
strPredecessor - The new predecessorpublic void setSuccessor(java.lang.String strSuccessor)
strSuccessor - The new sucessorpublic void setProbability(float fProbability)
fProbability - The new probabilitypublic char getPredecessor()
public java.lang.String getSuccessor()
public float getProbability()
public java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||