Package com.singularsys.exttests
Class ExtDocsTest.StringField2
java.lang.Object
com.singularsys.extensions.field.AbstractComparativeField
com.singularsys.exttests.ExtDocsTest.StringField2
- All Implemented Interfaces:
FieldI,Serializable
- Enclosing class:
ExtDocsTest
A simple implementation of a string field with a single cmp method
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd two members of the field.Logical and.Compare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.Divides two members of the field.getOne()Get the multiplicative identity for this field.getZero()Get the additive identity for this fieldThe modulus of two members of the field.Multiplies two members of the field.The negation -x of an element.Logical not.Logical or.The power operator.Subtract two members of the field.
-
Constructor Details
-
StringField2
public StringField2()
-
-
Method Details
-
add
Description 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.
-
cmp
Description copied from class:AbstractComparativeFieldCompare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.- Specified by:
cmpin classAbstractComparativeField- Parameters:
l-r-- Returns:
- -1, 0, 1 if l < r, l==r or l > r respectively, or null if comparison cannot be carried out or
-
sub
Description 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.
-
neg
Description 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.
-
mul
Description 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.
-
div
Description 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.
-
mod
Description 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.
-
pow
Description 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.
-
and
Description copied from interface:FieldILogical and.- Parameters:
l- left-hand argumentr- right-hand argument- Returns:
- an object representing the result or null if it can not be evaluated.
-
or
Description 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.
-
not
Description copied from interface:FieldILogical not.- Parameters:
l- argument- Returns:
- an object representing the result or null if it can not be evaluated.
-
getOne
Description copied from interface:FieldIGet the multiplicative identity for this field.- Returns:
- object representing one or null if undefined for this field
-
getZero
Description copied from interface:FieldIGet the additive identity for this field- Returns:
- object representing zero or null if undefined for this field
-