MathStringParser
Date: 2008-02-28

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## tcra.math
Class MathStringParser

    java.lang.Object
      tcra.math.MathTypeParser
          tcra.math.MathStringParser

    public class MathStringParser

extends MathTypeParser

MathStringParser is used to parse a StringBuilder for one single list.

Constructor Summary
`MathStringParser(MathTypeParser subParser)` Constructor specifying the parser to use to parse the elements of the string.

Method Summary
`MathString<MathType>` | `parse(java.lang.StringBuilder input)` Destructively parses the StringBuilder provided for a single list of elements.

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

### MathStringParser

    public MathStringParser(MathTypeParser subParser)

  Constructor specifying the parser to use to parse the elements of the string.

  Parameters:
    `subParser` - MathTypeParser used to parse the elements of the string.

Method Detail

### parse

    public MathString<MathType> parse(java.lang.StringBuilder input)
                               throws MathFormatException

  Destructively parses the StringBuilder provided for a single list of elements. The elements of the string are parsed by their own specific type of MathTypeParser (ergo the Strategy pattern).

  Specified by:
    `parse` in class `MathTypeParser`
  Parameters:
    `input` - StringBuilder to be parsed.
  Returns:
    MathString if parse completed successfully. `null` otherwise.
  Throws:
    `MathFormatException` - If some error in the input is encountered.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD