Interface IntegerConvertor
-
- All Known Subinterfaces:
MatrixFieldI
- All Known Implementing Classes:
AbstractMatrixField,BigDecimalField,BigIntegerField,BigModulusField,ComplexMatrixField,DoubleField,DoubleMatrixField,ExactIntegerField,ExtDocsTest.StringField3,FieldCollection,FieldMatrixField,GenericField,GenericFieldMatrixField,GenericMatrixField,GenericPowerField,IntegerField,LongField,MatrixFieldCollection,ModulusField,RationalField,SequenceMatrixField,ShortField,SimpleMatrixField,StandardField
public interface IntegerConvertorDefines fields which can convert numbers to or from integers. This is needed for the power operator as integer powers are considerably easier to calculate. It can also be used to get the size of a matrix or specify matrices of a specific size.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.ObjectconvertFromInt(java.lang.Integer l)Attempt to convert argument from an integerjava.lang.IntegerconvertToInt(java.lang.Object l)Attempt to convert argument to an integer
-
-
-
Method Detail
-
convertToInt
java.lang.Integer convertToInt(java.lang.Object l) throws EvaluationExceptionAttempt to convert argument to an integer- Parameters:
l- value to convert- Returns:
- corresponding integer or null if it cannot be converted
- Throws:
EvaluationException- on error
-
convertFromInt
java.lang.Object convertFromInt(java.lang.Integer l) throws EvaluationExceptionAttempt to convert argument from an integer- Parameters:
l- value to convert- Returns:
- corresponding value in this field or null if it cannot be converted
- Throws:
EvaluationException- probably never
-
-