Package com.singularsys.exttests
Class ExtDocsTest.StringField2
- java.lang.Object
-
- com.singularsys.extensions.field.implementations.AbstractComparativeField
-
- com.singularsys.exttests.ExtDocsTest.StringField2
-
- All Implemented Interfaces:
FieldI,java.io.Serializable
- Enclosing class:
- ExtDocsTest
public class ExtDocsTest.StringField2 extends AbstractComparativeField
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StringField2()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectadd(java.lang.Object l, java.lang.Object r)Add two members of the field.java.lang.Booleanand(java.lang.Object l, java.lang.Object r)Logical and.java.lang.Integercmp(java.lang.Object l, java.lang.Object r)Compare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.java.lang.Objectdiv(java.lang.Object l, java.lang.Object r)Divides two members of the field.java.lang.ObjectgetOne()Get the multiplicative identity for this field.java.lang.ObjectgetZero()Get the additive identity for this fieldjava.lang.Objectmod(java.lang.Object l, java.lang.Object r)The modulus of two members of the field.java.lang.Objectmul(java.lang.Object l, java.lang.Object r)Multiplies two members of the field.java.lang.Objectneg(java.lang.Object l)The negation -x of an element.java.lang.Booleannot(java.lang.Object l)Logical not.java.lang.Booleanor(java.lang.Object l, java.lang.Object r)Logical or.java.lang.Objectpow(java.lang.Object l, java.lang.Object r)The power operator.java.lang.Objectsub(java.lang.Object l, java.lang.Object r)Subtract two members of the field.
-
-
-
Method Detail
-
add
public java.lang.Object add(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldIAdd two members of the field.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
cmp
public java.lang.Integer cmp(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from class:AbstractComparativeFieldCompare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.- Specified by:
cmpin classAbstractComparativeField- Returns:
- -1, 0, 1 if l < r, l==r or l > r respectively, or null if comparison cannot be carried out or
- Throws:
EvaluationException
-
sub
public java.lang.Object sub(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldISubtract two members of the field.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
neg
public java.lang.Object neg(java.lang.Object l) throws EvaluationExceptionDescription copied from interface:FieldIThe negation -x of an element.- Parameters:
l- the argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
mul
public java.lang.Object mul(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldIMultiplies two members of the field.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
div
public java.lang.Object div(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldIDivides two members of the field.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
mod
public java.lang.Object mod(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldIThe modulus of two members of the field.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
pow
public java.lang.Object pow(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldIThe power operator.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
and
public java.lang.Boolean and(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldILogical and.- Parameters:
l- left hand argument implimentationr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
or
public java.lang.Boolean or(java.lang.Object l, java.lang.Object r) throws EvaluationExceptionDescription copied from interface:FieldILogical or.- Parameters:
l- left hand argumentr- right hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
not
public java.lang.Boolean not(java.lang.Object l) throws EvaluationExceptionDescription copied from interface:FieldILogical not.- Parameters:
l- argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
getOne
public java.lang.Object getOne()
Description copied from interface:FieldIGet the multiplicative identity for this field.- Returns:
- object representing one or null if undefined for this field
-
getZero
public java.lang.Object getZero()
Description copied from interface:FieldIGet the additive identity for this field- Returns:
- object representing zero or null if undefined for this field
-
-