org.simantics.databoard.type
Class NumberType

java.lang.Object
  extended by org.simantics.databoard.type.Datatype
      extended by org.simantics.databoard.type.NumberType
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
ByteType, DoubleType, FloatType, IntegerType, LongType

public abstract class NumberType
extends Datatype

NumberType is comparable primitive type: ByteType, IntegerType, DoubleType, LongType or FloatType


Nested Class Summary
 
Nested classes/interfaces inherited from class org.simantics.databoard.type.Datatype
Datatype.Visitor<T>, Datatype.Visitor1
 
Field Summary
static java.lang.String KEY_RANGE
          Value ranges that are valid.
static java.lang.String KEY_UNIT
          Unit string describes the quantity, magnitude and unit of the value.
 
Fields inherited from class org.simantics.databoard.type.Datatype
metadata
 
Constructor Summary
NumberType()
           
 
Method Summary
 int getComponentCount()
          Get component type count
 Datatype getComponentType(ChildReference path)
          Get component type
 Datatype getComponentType(int index)
          Get component type
 Range getRange()
           
 java.lang.String getRangeStr()
           
 java.lang.String getUnit()
          Get the unit type.
 void setRange(Range range)
           
 void setRange(java.lang.String range)
           
 void setUnit(java.lang.String unit)
          Set the unit type.
 
Methods inherited from class org.simantics.databoard.type.Datatype
accept, accept, equals, hashCode, metadataHashCode, toSingleLineString, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

KEY_UNIT

public static final java.lang.String KEY_UNIT
Unit string describes the quantity, magnitude and unit of the value.

See Also:
Constant Field Values

KEY_RANGE

public static final java.lang.String KEY_RANGE
Value ranges that are valid.

See Also:
Constant Field Values
Constructor Detail

NumberType

public NumberType()
Method Detail

getUnit

public java.lang.String getUnit()
Get the unit type. Unit string describes the quentity, magnity and unit of the value.

Returns:
the unit
See Also:
Units

setUnit

public void setUnit(java.lang.String unit)
Set the unit type. Unit string describes the quentity, magnity and unit of the value.

Parameters:
unit - the unit type
See Also:
Units

getRange

public Range getRange()

getRangeStr

public java.lang.String getRangeStr()

setRange

public void setRange(java.lang.String range)

setRange

public void setRange(Range range)

getComponentCount

public int getComponentCount()
Description copied from class: Datatype
Get component type count

Specified by:
getComponentCount in class Datatype
Returns:
component count

getComponentType

public Datatype getComponentType(int index)
Description copied from class: Datatype
Get component type

Specified by:
getComponentType in class Datatype
Parameters:
index - component index
Returns:
datatype

getComponentType

public Datatype getComponentType(ChildReference path)
Description copied from class: Datatype
Get component type

Specified by:
getComponentType in class Datatype
Parameters:
path - child path or null to return this.
Returns:
datatype