org.simantics.databoard.type
Class NumberType

java.lang.Object
  extended by org.simantics.databoard.type.Datatype
      extended by org.simantics.databoard.type.NumberType
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
 java.lang.String unit
          Unit string describes the quentity, magnity and unit of the value.
 
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, toSingleLineString, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

unit

public java.lang.String unit
Unit string describes the quentity, magnity and unit of the value.

See Also:
Units
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