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.Object
add(java.lang.Object l, java.lang.Object r)
Add two members of the field.java.lang.Boolean
and(java.lang.Object l, java.lang.Object r)
Logical and.java.lang.Integer
cmp(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.Object
div(java.lang.Object l, java.lang.Object r)
Divides two members of the field.java.lang.Object
getOne()
Get the multiplicative identity for this field.java.lang.Object
getZero()
Get the additive identity for this fieldjava.lang.Object
mod(java.lang.Object l, java.lang.Object r)
The modulus of two members of the field.java.lang.Object
mul(java.lang.Object l, java.lang.Object r)
Multiplies two members of the field.java.lang.Object
neg(java.lang.Object l)
The negation -x of an element.java.lang.Boolean
not(java.lang.Object l)
Logical not.java.lang.Boolean
or(java.lang.Object l, java.lang.Object r)
Logical or.java.lang.Object
pow(java.lang.Object l, java.lang.Object r)
The power operator.java.lang.Object
sub(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 EvaluationException
Description copied from interface:FieldI
Add 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 EvaluationException
Description copied from class:AbstractComparativeField
Compare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.- Specified by:
cmp
in 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 EvaluationException
Description copied from interface:FieldI
Subtract 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 EvaluationException
Description copied from interface:FieldI
The 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 EvaluationException
Description copied from interface:FieldI
Multiplies 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 EvaluationException
Description copied from interface:FieldI
Divides 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 EvaluationException
Description copied from interface:FieldI
The 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 EvaluationException
Description copied from interface:FieldI
The 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 EvaluationException
Description copied from interface:FieldI
Logical 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 EvaluationException
Description copied from interface:FieldI
Logical 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 EvaluationException
Description copied from interface:FieldI
Logical 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:FieldI
Get 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:FieldI
Get the additive identity for this field- Returns:
- object representing zero or null if undefined for this field
-
-