Overview  Package   Class  Tree  Index 

be.lassi.ui.sheet.parse
Class DefaultSyntax

java.lang.Object
  extended by be.lassi.ui.sheet.parse.DefaultSyntax
All Implemented Interfaces:
Syntax
Direct Known Subclasses:
SyntaxLevel, SyntaxTiming

public abstract class DefaultSyntax
extends java.lang.Object
implements Syntax


Nested Class Summary
protected  class DefaultSyntax.SyntaxException
           
 
Constructor Summary
DefaultSyntax()
           
 
Method Summary
protected abstract  void parse(java.lang.String string)
          Method parse.
protected  void singleOccurance(java.lang.String string, char c)
          Throw exception if there is more than one occurance of given character in given string.
 boolean syntax(java.lang.String string)
          Answer true if the syntax in given string is ok.
protected  void validateCharacters(java.lang.String validCharacters, java.lang.String string)
          Throw exception if given string contains characters other than the ones included in given string of valid characters.
protected  void validateDigits(java.lang.String string)
          Verifies that given string contains digit characters only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultSyntax

public DefaultSyntax()
Method Detail

parse

protected abstract void parse(java.lang.String string)
                       throws DefaultSyntax.SyntaxException
Method parse.

Parameters:
string -
Throws:
DefaultSyntax.SyntaxException

singleOccurance

protected void singleOccurance(java.lang.String string,
                               char c)
                        throws DefaultSyntax.SyntaxException
Throw exception if there is more than one occurance of given character in given string.

Parameters:
string -
c -
Throws:
DefaultSyntax.SyntaxException

syntax

public boolean syntax(java.lang.String string)
Answer true if the syntax in given string is ok.

Specified by:
syntax in interface Syntax
Returns:
boolean

validateCharacters

protected void validateCharacters(java.lang.String validCharacters,
                                  java.lang.String string)
                           throws DefaultSyntax.SyntaxException
Throw exception if given string contains characters other than the ones included in given string of valid characters.

Parameters:
validCharacters -
string -
Throws:
DefaultSyntax.SyntaxException

validateDigits

protected void validateDigits(java.lang.String string)
                       throws DefaultSyntax.SyntaxException
Verifies that given string contains digit characters only.

Parameters:
string -
Throws:
DefaultSyntax.SyntaxException

Overview  Package   Class  Tree  Index 
Lighting Assistant 1.2