Class IntegerDt

All Implemented Interfaces:
IDatatype, IElement, IIdentifiableElement, IPrimitiveDatatype<Integer>, ISupportsUndeclaredExtensions, Externalizable, Serializable, IBase, IBaseDatatype, IBaseIntegerDatatype, IPrimitiveType<Integer>
Direct Known Subclasses:
PositiveIntDt, UnsignedIntDt

public class IntegerDt extends BasePrimitive<Integer> implements IBaseIntegerDatatype
See Also:
  • Constructor Details

    • IntegerDt

      public IntegerDt()
      Constructor
    • IntegerDt

      public IntegerDt(int theInteger)
      Constructor
    • IntegerDt

      public IntegerDt(String theIntegerAsString)
      Constructor
      Parameters:
      theIntegerAsString - A string representation of an integer
      Throws:
      DataFormatException - If the string is not a valid integer representation
  • Method Details

    • parse

      protected Integer parse(String theValue)
      Description copied from class: BasePrimitive
      Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
      Specified by:
      parse in class BasePrimitive<Integer>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything
    • encode

      protected String encode(Integer theValue)
      Description copied from class: BasePrimitive
      Subclasses must override to convert a "coerced" value into an encoded one.
      Specified by:
      encode in class BasePrimitive<Integer>
      Parameters:
      theValue - Will not be null
      Returns:
      May return null if the value does not correspond to anything