hussam.math.operations.parser
Interface OperationsParser

All Known Implementing Classes:
MyParser

public interface OperationsParser

This is used by an OperationReader to read expressions.


Method Summary
 booleanisCloseParenthesis(char c)
          Returns true if this char indicated a close parenthesis such as ), ], } .
 booleanisCloseParenthesis(java.lang.String word)
          Returns true if this word indicates a close parenthesis such as ), ], } or even END.
 booleanisComma(char c)
          Returns true if the char acts like a partioner in a group.
 booleanisComma(java.lang.String word)
          returns true if this word act as a partition in a group, for example you can have the word AND as a partition for this group.
 booleanisFunction(java.lang.String word)
          Tests for Function name
 booleanisNumber(char c)
          returns true if this char is a Number.
 booleanisNumber(java.lang.String word)
          Tests for number String.
 booleanisOpenParenthesis(char c)
          Returns true if this char is an open Parenthesis. such as (, [, { etc.
 booleanisOpenParenthesis(java.lang.String word)
          Returns true if this String is an open Parenthesis. such as (, [, { or even Start, Begin etc.
 booleanisOperand(char c)
          Returns true if this char is an Operand.
 booleanisOperand(java.lang.String word)
          Tests for operand String.
 booleanisParenthesis(char c, char c1)
          Returns true of these two chars indicate a pair of parenthesis such as () , [], {}, <> or any other char!
 booleanisParenthesis(java.lang.String word, java.lang.String word1)
          Returns true if these two words indicate a block of code, like Start/End, Begin/Finish.
 booleanisVariable(char c)
          Returns true if this Char is a Variable.
 booleanisVariable(java.lang.String word)
          Tests for Variable name.
 

Method Detail

isOperand

boolean isOperand(char c)
Returns true if this char is an Operand.

Parameters:
c - The charectar
Returns:
True if the char is an Operand.

isNumber

boolean isNumber(char c)
returns true if this char is a Number.

Parameters:
c - The charectar
Returns:
True if the char is a number.

isVariable

boolean isVariable(char c)
Returns true if this Char is a Variable.

Parameters:
c - The charectar
Returns:
True if the char is a Variable name.

isOperand

boolean isOperand(java.lang.String word)
Tests for operand String.

Parameters:
word - name.
Returns:
True if the String is an Operand.

isNumber

boolean isNumber(java.lang.String word)
Tests for number String.

Parameters:
word - name.
Returns:
True if the String is a Number.

isVariable

boolean isVariable(java.lang.String word)
Tests for Variable name.

Parameters:
word - name.
Returns:
True if the String is Variable Name.

isFunction

boolean isFunction(java.lang.String word)
Tests for Function name

Parameters:
word - name.
Returns:
True if the String is a Function name.

isCloseParenthesis

boolean isCloseParenthesis(java.lang.String word)
Returns true if this word indicates a close parenthesis such as ), ], } or even END.

Parameters:
word - The word to be evaluated.
Returns:
true if it is an openParenthesis.
Since:
Version 3
See Also:
isParenthesis(String, String)

isOpenParenthesis

boolean isOpenParenthesis(java.lang.String word)
Returns true if this String is an open Parenthesis. such as (, [, { or even Start, Begin etc.

Parameters:
word - the word to be evaluated.
Returns:
true if this indicated an open parenthesis.
Since:
Version 3
See Also:
isParenthesis(String, String)

isCloseParenthesis

boolean isCloseParenthesis(char c)
Returns true if this char indicated a close parenthesis such as ), ], } .

Parameters:
c - the char to be evaluated.
Returns:
true if this indicated a close parenthesis.
Since:
Version 3
See Also:
isParenthesis(char, char)

isOpenParenthesis

boolean isOpenParenthesis(char c)
Returns true if this char is an open Parenthesis. such as (, [, { etc.

Parameters:
c - the char to be evaluated.
Returns:
true if this indicates an open parenthesis char.
Since:
Version 3
See Also:
isParenthesis(char, char)

isParenthesis

boolean isParenthesis(char c,
                      char c1)
Returns true of these two chars indicate a pair of parenthesis such as () , [], {}, <> or any other char!

Parameters:
c - The open parenthesis
c1 - the close parenthesis.
Returns:
true if the two chars indicate a parenthsis pair.
Since:
Version 3

isParenthesis

boolean isParenthesis(java.lang.String word,
                      java.lang.String word1)
Returns true if these two words indicate a block of code, like Start/End, Begin/Finish. or even []/{}/<>!!

Parameters:
word - The open parenthesis.
word1 - the close parenthesis.
Returns:
true if these two words are an open and a close parenthesis.
Since:
Version 3

isComma

boolean isComma(java.lang.String word)
returns true if this word act as a partition in a group, for example you can have the word AND as a partition for this group.
{1 AND 5 AND 7}

Parameters:
word - The word to be evaluated.
Returns:
true id the word acts like a comma.

isComma

boolean isComma(char c)
Returns true if the char acts like a partioner in a group. For Exmaple: the comma is a partitioner in this group.
{ 1,3,5,6,7}

Parameters:
c - the char to be evaluated.
Returns:
true if this is a comma.