org.qtitools.qti.attribute.enumerate
Class RoundingModeAttribute

java.lang.Object
  extended by org.qtitools.qti.attribute.AbstractAttribute
      extended by org.qtitools.qti.attribute.SingleAttribute
          extended by org.qtitools.qti.attribute.enumerate.RoundingModeAttribute
All Implemented Interfaces:
java.io.Serializable, Attribute, EnumerateAttribute, Validatable

public class RoundingModeAttribute
extends SingleAttribute
implements EnumerateAttribute

Attribute with roundingMode value.

Author:
Jiri Kajaba
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.qtitools.qti.attribute.AbstractAttribute
logger
 
Constructor Summary
RoundingModeAttribute(XmlNode parent, java.lang.String name)
          Constructs attribute.
RoundingModeAttribute(XmlNode parent, java.lang.String name, RoundingMode defaultValue)
          Constructs attribute.
RoundingModeAttribute(XmlNode parent, java.lang.String name, RoundingMode value, RoundingMode defaultValue, boolean required)
          Constructs attribute.
 
Method Summary
 RoundingMode getDefaultValue()
          Gets default value of attribute.
 RoundingMode[] getSupportedValues()
          Gets all supported values of this attribute.
 RoundingMode getValue()
          Gets value of attribute.
protected  RoundingMode parseValue(java.lang.String value)
          Parses value from given string.
 void setDefaultValue(RoundingMode defaultValue)
          Sets new default value of attribute.
 void setValue(RoundingMode value)
          Sets new value of attribute.
 
Methods inherited from class org.qtitools.qti.attribute.SingleAttribute
defaultValueToString, load, load, setDefaultValue, setValue, valueToString
 
Methods inherited from class org.qtitools.qti.attribute.AbstractAttribute
getFullName, getLoadedValue, getLoadingProblem, getName, getParent, isRequired, isSupported, setLoadedValue, setLoadingProblem, setSupported, toString, toXmlString, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.qtitools.qti.attribute.Attribute
defaultValueToString, getFullName, getLoadedValue, getLoadingProblem, getName, getParent, isRequired, isSupported, load, load, setSupported, toXmlString, valueToString
 
Methods inherited from interface org.qtitools.qti.validation.Validatable
validate
 

Constructor Detail

RoundingModeAttribute

public RoundingModeAttribute(XmlNode parent,
                             java.lang.String name)
Constructs attribute.

Parameters:
parent - attribute's parent
name - attribute's name

RoundingModeAttribute

public RoundingModeAttribute(XmlNode parent,
                             java.lang.String name,
                             RoundingMode defaultValue)
Constructs attribute.

Parameters:
parent - attribute's parent
name - attribute's name
defaultValue - attribute's default value

RoundingModeAttribute

public RoundingModeAttribute(XmlNode parent,
                             java.lang.String name,
                             RoundingMode value,
                             RoundingMode defaultValue,
                             boolean required)
Constructs attribute.

Parameters:
parent - attribute's parent
name - attribute's name
value - attribute's value
defaultValue - attribute's default value
required - is this attribute required
Method Detail

getValue

public RoundingMode getValue()
Description copied from class: SingleAttribute
Gets value of attribute.

Overrides:
getValue in class SingleAttribute
Returns:
value of attribute
See Also:
SingleAttribute.setValue(java.lang.Object)

setValue

public void setValue(RoundingMode value)
Sets new value of attribute.

Parameters:
value - new value of attribute
See Also:
getValue()

getDefaultValue

public RoundingMode getDefaultValue()
Description copied from class: SingleAttribute
Gets default value of attribute.

Overrides:
getDefaultValue in class SingleAttribute
Returns:
default value of attribute
See Also:
SingleAttribute.setDefaultValue(java.lang.Object)

setDefaultValue

public void setDefaultValue(RoundingMode defaultValue)
Sets new default value of attribute.

Parameters:
defaultValue - new default value of attribute
See Also:
getDefaultValue()

parseValue

protected RoundingMode parseValue(java.lang.String value)
Description copied from class: SingleAttribute
Parses value from given string.

Specified by:
parseValue in class SingleAttribute
Parameters:
value - string value
Returns:
parsed value

getSupportedValues

public RoundingMode[] getSupportedValues()
Gets all supported values of this attribute.

Specified by:
getSupportedValues in interface EnumerateAttribute
Returns:
all supported values of this attribute


Copyright © 2009. All Rights Reserved.