Class IntegerValue

  • All Implemented Interfaces:
    Peer

    public final class IntegerValue
    extends Content
    An element that creates a unit of data content representing an integer value. integer-data is PCDATA that obeys the following rules:
    1. an optional sign
    2. no fractional digits
    3. no exponent
    • Constructor Detail

      • IntegerValue

        public IntegerValue​(Element parent,
                            Node prevSibling)
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Description copied from class: Content
        Equals is a helper function that returns whether two Contents are equal (case-sensitive, and considering the null state of both nodes).
        Overrides:
        equals in class Content
        Parameters:
        object - the content node to compare.
        Returns:
        true if the content nodes are equal.
      • hashCode

        public int hashCode()
        Description copied from class: Content
        Returns a hash code value for the object. This method is unsupported.
        Overrides:
        hashCode in class Content
      • getValue

        public int getValue()
        Retrieve the value as an integer.
        Returns:
        the value as integer.
      • setValue

        public void setValue​(int newValue)
        Update the integer value
        Parameters:
        newValue - new value as integer
      • setValue

        public void setValue​(java.lang.String sValue,
                             boolean bFromData)
        Update the integer value
        Parameters:
        sValue - new value as string. Use this method to set the value to null.
      • toString

        public java.lang.String toString()
        Description copied from class: Content
        Return the value of the content as a string
        Overrides:
        toString in class Content
        Returns:
        the string representation of the value.
      • valueHasTypeMismatch

        public boolean valueHasTypeMismatch()
        Returns true if the current value does not legally parse into an integer.