de.enough.polish.dataeditor
Class CountTerm
java.lang.Object
de.enough.polish.dataeditor.CountTerm
public class CountTerm
- extends Object
Represents a simple term for calculating the number of entries of a specific data entry.
Copyright Enough Software 2004 - 2011
history
19-Oct-2004 - rob creation
- Author:
- Robert Virkus, j2mepolish@enough.de
OPERATION_ADD
public static final int OPERATION_ADD
- See Also:
- Constant Field Values
OPERATION_SUBTRACT
public static final int OPERATION_SUBTRACT
- See Also:
- Constant Field Values
OPERATION_MULTIPLY
public static final int OPERATION_MULTIPLY
- See Also:
- Constant Field Values
OPERATION_DEVIDE
public static final int OPERATION_DEVIDE
- See Also:
- Constant Field Values
CountTerm
public CountTerm(int operation,
DataEntry[] operants)
- Creates a new term.
- Parameters:
operation - the operation, either OPERATION_ADD, OPERATION_SUBTRACT, OPERATION_MULTIPLY or OPERATION_DEVIDEoperants - the entries which are used in this calculation
calculateCount
public int calculateCount()
toString
public String toString()
- Overrides:
toString in class Object
toCodeString
public String toCodeString()
- Returns:
- the string representation
createTerm
public static CountTerm createTerm(String term,
DataManager manager)
- Parameters:
term - the term stringmanager - the data manager
- Returns:
- the term object
getOperants
public DataEntry[] getOperants()
- Returns:
- the data
getColumns
public int getColumns()
- Returns:
- the number of columns for this term
getRows
public int getRows()
- Returns:
- the number of rows for this term