Class StandardField
java.lang.Object
com.singularsys.extensions.field.implementations.StandardField
- All Implemented Interfaces:
FieldI,IntegerConvertor,Serializable
A Field implementation using the default Jep methods for evaluation. So to
add two elements it will use the
Add.add(Object, Object) method of the Add class.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd two members of the field.Logical and.Attempt to convert argument from an integerAttempt to convert argument to an integerDivides two members of the field.EqualsGreater or equal togetAdd()Return the PFMC used for the add operationgetAnd()getComp()getDiv()getMod()getMul()getNot()getOne()Get the multiplicative identity for this field.getOr()getPow()getSub()getUmin()getZero()Get the additive identity for this fieldGreater thanLess than or equals toLess thanThe modulus of two members of the field.Multiplies two members of the field.Not EqualsThe negation -x of an element.Logical not.Logical or.The power operator.voidSets the PFMC used for add operations.voidvoidsetComp(Comparative comp) voidvoidvoidvoidvoidvoidvoidvoidSubtract two members of the field.
-
Constructor Details
-
StandardField
public StandardField()
-
-
Method Details
-
add
Description copied from interface:FieldIAdd two members of the field.- Specified by:
addin interfaceFieldI- 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
-
sub
Description copied from interface:FieldISubtract two members of the field.- Specified by:
subin interfaceFieldI- 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
Description copied from interface:FieldIThe negation -x of an element.- Specified by:
negin interfaceFieldI- Parameters:
l- the argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
mul
Description copied from interface:FieldIMultiplies two members of the field.- Specified by:
mulin interfaceFieldI- 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
Description copied from interface:FieldIDivides two members of the field.- Specified by:
divin interfaceFieldI- 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
Description copied from interface:FieldIThe modulus of two members of the field.- Specified by:
modin interfaceFieldI- 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
Description copied from interface:FieldIThe power operator.- Specified by:
powin interfaceFieldI- 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
-
eq
Description copied from interface:FieldIEquals- Specified by:
eqin interfaceFieldI- 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
-
ne
Description copied from interface:FieldINot Equals- Specified by:
nein interfaceFieldI- 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
-
lt
Description copied from interface:FieldILess than- Specified by:
ltin interfaceFieldI- 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
-
le
Description copied from interface:FieldILess than or equals to- Specified by:
lein interfaceFieldI- 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
-
gt
Description copied from interface:FieldIGreater than- Specified by:
gtin interfaceFieldI- 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
-
ge
Description copied from interface:FieldIGreater or equal to- Specified by:
gein interfaceFieldI- 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
Description copied from interface:FieldILogical and.- Specified by:
andin interfaceFieldI- 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
-
or
Description copied from interface:FieldILogical or.- Specified by:
orin interfaceFieldI- 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
Description copied from interface:FieldILogical not.- Specified by:
notin interfaceFieldI- Parameters:
l- argument- Returns:
- an object representing the result or null if it can not be evaluated.
- Throws:
EvaluationException- on error
-
getZero
Description copied from interface:FieldIGet the additive identity for this field -
getOne
Description copied from interface:FieldIGet the multiplicative identity for this field. -
convertToInt
Description copied from interface:IntegerConvertorAttempt to convert argument to an integer- Specified by:
convertToIntin interfaceIntegerConvertor- Parameters:
l- value to convert- Returns:
- corresponding integer or null if it cannot be converted
-
convertFromInt
Description copied from interface:IntegerConvertorAttempt to convert argument from an integer- Specified by:
convertFromIntin interfaceIntegerConvertor- Parameters:
l- value to convert- Returns:
- corresponding value in this field or null if it cannot be converted
-
getAdd
Return the PFMC used for the add operation- Returns:
- function used
-
setAdd
Sets the PFMC used for add operations.- Parameters:
add- PFMC must extend the Add class and implement theAdd.add(Object, Object)method.
-
getSub
-
setSub
-
getUmin
-
setUmin
-
getMul
-
setMul
-
getMod
-
setMod
-
getDiv
-
setDiv
-
getPow
-
setPow
-
getComp
-
setComp
-
getAnd
-
setAnd
-
getOr
-
setOr
-
getNot
-
setNot
-