Class NumberProp

All Implemented Interfaces:
EventListener, IGProp<Double>, Cloneable

public class NumberProp extends DoubleProp
JavaScript optimized Number property.
Author:
Christopher Mindus
  • Constructor Details

    • NumberProp

      protected NumberProp()
      Creates a Number property with no name and a null value.
    • NumberProp

      public NumberProp(Atom propertyAtom)
      Creates a Number property with the specified name with a null value.
      Parameters:
      propertyAtom - the property atom.
    • NumberProp

      public NumberProp(Atom propertyAtom, double newValue) throws PropValidateException
      Creates a Number property with the specified name and value.
      Parameters:
      propertyAtom - the property atom.
      newValue - the new Double value for the property.
      Throws:
      PropValidateException - When the constraints are not met.
  • Method Details

    • appendPropValue

      protected void appendPropValue(PropMgr propertyManager, SendTransaction trans, Object value)
      Appends the Number property value as a String. If uninitialized, "" is appended.
      Overrides:
      appendPropValue in class DoubleProp
      Parameters:
      propertyManager - the property manager instance.
      trans - transaction to append the properties to.
      value - the value to append to the transaction, a reference to the current property value.
    • initializeValue

      public boolean initializeValue(PropMgr propertyManager, ReadTransaction trans) throws PropException
      Initializes the property value from a transaction.
      Overrides:
      initializeValue in class DoubleProp
      Parameters:
      propertyManager - the property manager.
      trans - the transaction to initialize the property with.
      Returns:
      true if the value has changed, false otherwise.
      Throws:
      PropException