|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.biology.lsystems.growing.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(java.lang.String strRule)
Constructor by passing the string of hte rule |
|
Rule(java.lang.String strPredecessor,
java.lang.String strSuccessor)
Constructor allowing to initialize the predecesor and successor |
|
| Method Summary | |
|---|---|
static int |
getElementAge(java.lang.String strLine)
Extracts the age of the first occurence of an element in the given string. |
static char |
getElementID(java.lang.String strLine)
Extracts the ID char of the first occurence of an element in the given string. |
java.lang.String |
getPredecessor()
Returns the predecessor value of this rule. |
int |
getPredecessorAge()
Retrieves the predecessor age. |
char |
getPredecessorID()
Retrieves the predecessor ID |
java.lang.String |
getSuccessor()
Returns the successor value of this rule |
void |
setPredecessor(java.lang.String strPredecessor)
Stores a new predecessor 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(java.lang.String strRule)
throws java.lang.Exception
strRule - The string of this rule.
java.lang.Exception - Is thrown if the rule is not in the right form or
contains invalid signs.
public Rule(java.lang.String strPredecessor,
java.lang.String strSuccessor)
strPredecessor - The predecessor of this rule.strSuccessor - The successor of the rule.| Method Detail |
|---|
public static char getElementID(java.lang.String strLine)
strLine - The string containing the element.
GrowingPlantsDefinitionspublic static int getElementAge(java.lang.String strLine)
strLine - The string containing the element.
GrowingPlantsDefinitionspublic char getPredecessorID()
public int getPredecessorAge()
public void setPredecessor(java.lang.String strPredecessor)
strPredecessor - The new predecessorpublic void setSuccessor(java.lang.String strSuccessor)
strSuccessor - The new sucessorpublic java.lang.String getPredecessor()
public java.lang.String getSuccessor()
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 | ||||||||