Class FloatValue

All Implemented Interfaces:
Peer

public final class FloatValue extends Content
An element that creates a unit of data content representing an floating point value. float-data is PCDATA that obeys the following rules:
1. no limit on the number of digits
2. optional leading sign
3. fractional digits
4. optional exponent
  • Constructor Details

    • FloatValue

      public FloatValue(Element parent, Node prevSibling)
  • Method Details

    • equals

      public boolean equals(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
    • getScriptTable

      public ScriptTable getScriptTable()
      Overrides:
      getScriptTable in class Content
    • getValue

      public double getValue()
      Return the value as double. Note that you should call checkValidState() to determine if the value was parsed properly.
      Returns:
      the value as double.
    • setValue

      public void setValue(double newValue, boolean bNotify, boolean bDefault)
      Update the double value
      Parameters:
      newValue - new value as double
    • setValue

      public void setValue(String sValue, boolean bFromData, boolean bNotify, boolean bDefault)
      Update the double value
      Overrides:
      setValue in class Content
      Parameters:
      sValue - new value as string. Use this method to set the value to null.
    • toString

      public 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.
    • appendChild

      public void appendChild(Node child, boolean bValidate)
      Description copied from class: Element
      Appends the given child to this element.
      Overrides:
      appendChild in class Content
      Parameters:
      child - the child node being appended.
      bValidate - when true, ensures the given child is valid per the model's schema and throws an ExFull if not.
    • insertChild

      public void insertChild(Node child, Node poRefNode, boolean bValidate)
      Description copied from class: Element
      Inserts a child before a specific child in the child list.
      Overrides:
      insertChild in class Content
      Parameters:
      child - the child to be inserted
      poRefNode - the child to insert before
      bValidate - if true, validate the insertion
    • valueHasTypeMismatch

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