Class ExtDocsTest.StringField3

    • Constructor Summary

      Constructors 
      Constructor Description
      StringField3()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String addG​(java.lang.String l, java.lang.String r)
      Adds two elements of type E.
      java.lang.String cast​(java.lang.Object l)
      Convert the input to type E.
      java.lang.Integer cmpG​(java.lang.String l, java.lang.String r)
      Compare two objects of the same type.
      java.lang.String convertFromInt​(java.lang.Integer l)
      Attempt to convert argument from an integer
      java.lang.Integer convertToIntE​(java.lang.String l)
      If possible convert the argument to an Integer to enable integral powers.
      java.lang.String divG​(java.lang.String l, java.lang.String r)
      Divides two elements of type E.
      java.lang.String getOne()
      Get the multiplicative identity for this field.
      java.lang.String getZero()
      Get the additive identity for this field
      java.lang.String modG​(java.lang.String l, java.lang.String r)
      Modulus of two elements of type E.
      java.lang.String mulG​(java.lang.String l, java.lang.String r)
      Multiplies two elements of type E.
      java.lang.String negG​(java.lang.String l)
      Negates an elements of type E.
      java.lang.String powG​(java.lang.String l, java.lang.String r)
      Raises l to the power of r
      java.lang.String subG​(java.lang.String l, java.lang.String r)
      Subtracts two elements of type E.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StringField3

        public StringField3()
    • Method Detail

      • cast

        public java.lang.String cast​(java.lang.Object l)
        Description copied from class: GenericField
        Convert the input to type E.
        Specified by:
        cast in class GenericField<java.lang.String>
        Returns:
        l cast to type E if possible or null if casting is not possible
      • addG

        public java.lang.String addG​(java.lang.String l,
                                     java.lang.String r)
                              throws EvaluationException
        Description copied from class: GenericField
        Adds two elements of type E.
        Specified by:
        addG in class GenericField<java.lang.String>
        Parameters:
        l - lhs argument
        r - rhs argument
        Returns:
        the sum
        Throws:
        EvaluationException - on error
      • cmpG

        public java.lang.Integer cmpG​(java.lang.String l,
                                      java.lang.String r)
                               throws EvaluationException
        Description copied from class: GenericField
        Compare two objects of the same type.
        Specified by:
        cmpG in class GenericField<java.lang.String>
        Parameters:
        l - left argument
        r - right argument
        Returns:
        -1, 0, 1 or null
        Throws:
        EvaluationException
      • subG

        public java.lang.String subG​(java.lang.String l,
                                     java.lang.String r)
        Description copied from class: GenericField
        Subtracts two elements of type E.
        Specified by:
        subG in class GenericField<java.lang.String>
        Parameters:
        l - lhs argument
        r - rhs argument
        Returns:
        the difference
      • negG

        public java.lang.String negG​(java.lang.String l)
        Description copied from class: GenericField
        Negates an elements of type E.
        Specified by:
        negG in class GenericField<java.lang.String>
        Parameters:
        l - the argument
        Returns:
        the negation
      • mulG

        public java.lang.String mulG​(java.lang.String l,
                                     java.lang.String r)
        Description copied from class: GenericField
        Multiplies two elements of type E.
        Specified by:
        mulG in class GenericField<java.lang.String>
        Parameters:
        l - lhs argument
        r - rhs argument
        Returns:
        the product
      • divG

        public java.lang.String divG​(java.lang.String l,
                                     java.lang.String r)
        Description copied from class: GenericField
        Divides two elements of type E.
        Specified by:
        divG in class GenericField<java.lang.String>
        Parameters:
        l - numerator
        r - denominator
        Returns:
        the division
      • modG

        public java.lang.String modG​(java.lang.String l,
                                     java.lang.String r)
        Description copied from class: GenericField
        Modulus of two elements of type E.
        Specified by:
        modG in class GenericField<java.lang.String>
        Parameters:
        l - lhs argument
        r - rhs argument
        Returns:
        the modulus
      • powG

        public java.lang.String powG​(java.lang.String l,
                                     java.lang.String r)
        Description copied from class: GenericField
        Raises l to the power of r
        Specified by:
        powG in class GenericField<java.lang.String>
        Parameters:
        l - lhs argument
        r - rhs argument
        Returns:
        the power
      • getOne

        public java.lang.String getOne()
        Description copied from interface: FieldI
        Get the multiplicative identity for this field.
        Specified by:
        getOne in interface FieldI
        Specified by:
        getOne in class GenericField<java.lang.String>
        Returns:
        object representing one or null if undefined for this field
      • getZero

        public java.lang.String getZero()
        Description copied from interface: FieldI
        Get the additive identity for this field
        Specified by:
        getZero in interface FieldI
        Specified by:
        getZero in class GenericField<java.lang.String>
        Returns:
        object representing zero or null if undefined for this field
      • convertToIntE

        public java.lang.Integer convertToIntE​(java.lang.String l)
                                        throws EvaluationException
        Description copied from class: GenericField
        If possible convert the argument to an Integer to enable integral powers. If the argument cannot be converted null should be returned and the powG(E,E) method will be called.
        Specified by:
        convertToIntE in class GenericField<java.lang.String>
        Parameters:
        l - argument to convert.
        Returns:
        an integer or null if argument cannot be converted
        Throws:
        EvaluationException