DimDom v0.8.2

org.alltimeflashdreamer.dimdom
Class CommandParser

java.lang.Object
  |
  +--org.alltimeflashdreamer.dimdom.CommandParser

class CommandParser
extends Object

Title: CommandParser
Description: This class contains the methods that are able to parse DimDom commands.
These methods are centralized herein to easily find them again in case of changes or extensions of the DimDom specification.


Method Summary
(package private) static int getNumberOfRepetitions(String sRepeatCommand)
          Parses the command string and returns the number of repetitions to be done / that are allowed at most.
This method is defined statically to be callable from not instantiating classes too and to increase the performance of this very simple task.
In case the parsing fails, a DimDomException is thrown.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getNumberOfRepetitions

static int getNumberOfRepetitions(String sRepeatCommand)
                           throws DimDomException
Parses the command string and returns the number of repetitions to be done / that are allowed at most.
This method is defined statically to be callable from not instantiating classes too and to increase the performance of this very simple task.
In case the parsing fails, a DimDomException is thrown.
Parameters:
sRepeatCommand - the value of the "dimdom" attribute in the template
Returns:
the number of repetitions, -1 if unlimited ("*")
Throws:
DimDomException - thrown if the command isn't parseable

Copyright (c) 2001/02 by Florian Steinsiepe