com.tensegrity.palojava
Class DimElementInfo

java.lang.Object
  extended by com.tensegrity.palojava.DimElementInfo

public final class DimElementInfo
extends java.lang.Object

DimElementInfo A simple data class which holds the name and the type of an element. All valid element types are defined as constants within this class.

Version:
$ID:$
Author:
Stepan Rutz

Field Summary
static int DIMELEMENTTYPECONSOLIDATED
          valid element types.
static int DIMELEMENTTYPENUMERIC
          valid element types.
static int DIMELEMENTTYPERULE
          valid element types.
static int DIMELEMENTTYPESTRING
          valid element types.
 
Constructor Summary
DimElementInfo(java.lang.String name, int type)
          Creates a new DimElementInfo instance.
 
Method Summary
static java.lang.String dimElementType2String(int type)
          Returns a String representation of the given element type
 java.lang.String getName()
          Returns the element name
 int getType()
          Returns the element type, i.e. one of defined type constants
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DIMELEMENTTYPENUMERIC

public static final int DIMELEMENTTYPENUMERIC
valid element types.

See Also:
Constant Field Values

DIMELEMENTTYPESTRING

public static final int DIMELEMENTTYPESTRING
valid element types.

See Also:
Constant Field Values

DIMELEMENTTYPECONSOLIDATED

public static final int DIMELEMENTTYPECONSOLIDATED
valid element types.

See Also:
Constant Field Values

DIMELEMENTTYPERULE

public static final int DIMELEMENTTYPERULE
valid element types.

See Also:
Constant Field Values
Constructor Detail

DimElementInfo

public DimElementInfo(java.lang.String name,
                      int type)
Creates a new DimElementInfo instance.

Parameters:
name - the element name
type - the element type as defined in this class
Method Detail

getName

public java.lang.String getName()
Returns the element name

Returns:
the element name

getType

public int getType()
Returns the element type, i.e. one of defined type constants

Returns:
the element type

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

dimElementType2String

public static java.lang.String dimElementType2String(int type)
Returns a String representation of the given element type

Parameters:
type - one of the defined element type constants
Returns:
a corresponding String representation