Package com.nt.udc.io
Class COSARAttr
java.lang.Object
com.nt.udc.io.COSARAttr
- Direct Known Subclasses:
COSARAttrByte
,COSARAttrDouble
,COSARAttrFloat
,COSARAttrInt
,COSARAttrIP
,COSARAttrLong
,COSARAttrShort
,COSARAttrString
,COSARAttrUInt
This class represents the abstract base-class for all
OSAR attributes ( fields ).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]
double
final String
getId()
byte[]
long
long
int
getType()
protected int
idToInt()
final void
boolean
setStringValue
(String value) This function sets the attribute value based on a string.boolean
This function sets converts the value contained by the passed attribute to the current typetoString()
-
Field Details
-
m_type
protected int m_typeOSAR attr type -
m_id
OSAR attr id
-
-
Constructor Details
-
COSARAttr
This constructor initializes a new COSARAttr based on type and id. Instances may be created only by sub-classes.- Parameters:
type
- The type of the OSAR attributeid
- The id of the OSAR attribute
-
-
Method Details
-
getType
public int getType()- Returns:
- The type of the OSAR attribute
-
getId
- Returns:
- The field-id of the OSAR attribute
-
getStringValue
- Returns:
- The value as a string
- Throws:
Exception
-
getLongValue
- Returns:
- The value as a long
- Throws:
Exception
-
getMillisValue
- Returns:
- The value as in milliseconds
- Throws:
Exception
-
getIPValue
- Returns:
- The value as a raw IP address
- Throws:
Exception
-
getBytesValue
- Returns:
- The value as an array of bytes
- Throws:
Exception
-
getDoubleValue
- Returns:
- The value as a double
- Throws:
Exception
-
getRecAttr
- Returns:
- The equivalent OSARecAttr
-
getDCField
- Returns:
- The equivalent DCField
-
toString
-
setId
-
setStringValue
This function sets the attribute value based on a string.- Returns:
- true if successful, false otherwise
-
setValue
This function sets converts the value contained by the passed attribute to the current type -
idToInt
protected int idToInt()
-