Class ExtDocsTest.StringField2

java.lang.Object
com.singularsys.extensions.field.AbstractComparativeField
com.singularsys.exttests.ExtDocsTest.StringField2
All Implemented Interfaces:
FieldI, Serializable
Enclosing class:
ExtDocsTest

public static class ExtDocsTest.StringField2 extends AbstractComparativeField
A simple implementation of a string field with a single cmp method
See Also:
  • Constructor Details

    • StringField2

      public StringField2()
  • Method Details

    • add

      public Object add(Object l, Object r)
      Description copied from interface: FieldI
      Add two members of the field.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • cmp

      public Integer cmp(Object l, Object r)
      Description copied from class: AbstractComparativeField
      Compare two elements, return -1,0,1 if the comparison can be carried out, null otherwise.
      Specified by:
      cmp in class AbstractComparativeField
      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

      public Object sub(Object l, Object r)
      Description copied from interface: FieldI
      Subtract two members of the field.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • neg

      public Object neg(Object l)
      Description copied from interface: FieldI
      The negation -x of an element.
      Parameters:
      l - the argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • mul

      public Object mul(Object l, Object r)
      Description copied from interface: FieldI
      Multiplies two members of the field.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • div

      public Object div(Object l, Object r)
      Description copied from interface: FieldI
      Divides two members of the field.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • mod

      public Object mod(Object l, Object r)
      Description copied from interface: FieldI
      The modulus of two members of the field.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • pow

      public Object pow(Object l, Object r)
      Description copied from interface: FieldI
      The power operator.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • and

      public Boolean and(Object l, Object r)
      Description copied from interface: FieldI
      Logical and.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • or

      public Boolean or(Object l, Object r)
      Description copied from interface: FieldI
      Logical or.
      Parameters:
      l - left-hand argument
      r - right-hand argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • not

      public Boolean not(Object l)
      Description copied from interface: FieldI
      Logical not.
      Parameters:
      l - argument
      Returns:
      an object representing the result or null if it can not be evaluated.
    • getOne

      public Object getOne()
      Description copied from interface: FieldI
      Get the multiplicative identity for this field.
      Returns:
      object representing one or null if undefined for this field
    • getZero

      public Object getZero()
      Description copied from interface: FieldI
      Get the additive identity for this field
      Returns:
      object representing zero or null if undefined for this field