Interface IntegerConvertor

All Known Subinterfaces:
MatrixFieldI
All Known Implementing Classes:
AbstractMatrixField, BigDecimalField, BigIntegerField, BigIntegerToRationalDecorator, BigModulusField, ComplexFieldWithRealOrder, ComplexFieldWithTotalOrder, ComplexMatrixField, DoubleField, DoubleMatrixField, ExactIntegerField, ExtDocsTest.StringField3, ExternalMatrixField, FieldCollection, FieldConsole.AllToComplexDecorator, FieldConsole.RationalBigDecToDoubleDecorator, FieldConsole.RationalToBigDecDecorator, FieldDecorator, FieldMatrixField, FixedPointField, GenericField, GenericFieldMatrixField, GenericMatrixField, GenericPowerField, IntegerField, IntegerToBigIntegerDecorator, LongField, MatrixFieldCollection, ModulusField, NumberToComplexDecorator, NumberToDoubleDecorator, RationalField, SequenceMatrixField, ShortField, SimpleMatrixField, StandardField

public interface IntegerConvertor
Defines 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.

Since Jep 4.1 extensions 2.2 this has been moved to the com.singularsys.extensions.field.implementations package from the the com.singularsys.extensions.field package.

  • Method Details

    • convertToInt

      Integer convertToInt(Object l) throws EvaluationException
      Attempt 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

      Object convertFromInt(Integer l) throws EvaluationException
      Attempt 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