|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecttcra.math.MathTypeParser
tcra.math.MathIntegerParser
public class MathIntegerParser
MathIntegerParser is used to parse a MathInteger out of a String. If a valid integer can not be parsed, a MathFormatException is thrown. MathIntegerPaser follows the Singleton pattern since it is stateless and can save memory by only allowing one instance to exist.
| Constructor Summary | |
|---|---|
MathIntegerParser()
|
|
| Method Summary | |
|---|---|
MathInteger |
parse(java.lang.StringBuilder input)
Consumes all the characters from the front of a StringBuilder until it finds a ',' or '>'. |
| Methods inherited from class tcra.math.MathTypeParser |
|---|
eatWhitespace, nextToken |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MathIntegerParser()
| Method Detail |
|---|
public MathInteger parse(java.lang.StringBuilder input)
throws MathFormatException
parse in class MathTypeParserinput - StringBuilder that contains an integer at the
front.
MathFormatException - If what is read is not a valid
integer.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||