|
Copyright 2008 Motorola Inc. and Nokia Corporation. All Rights Reserved. Specification License |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.broadcast.esg.Attribute javax.microedition.broadcast.esg.NumericAttribute
public class NumericAttribute
A NumericAttribute that references a numeric value of arbitrary length and precision. The attribute will be represented as String with indication of sign and type to handle "non-primitive" data types.
MetadataSet
,
CommonMetadataSet
Field Summary | |
---|---|
static int |
FIXED_POINT_TYPE
FIXED_POINT_TYPE references fixed-point numbers (e.g decimal numbers like prices with unit and currency) |
static int |
FLOATING_POINT_TYPE
FLOATING_POINT_TYPE references floating-point numbers |
static int |
INTEGER_TYPE
INTEGER_TYPE references integer numbers |
Constructor Summary | |
---|---|
NumericAttribute(java.lang.String attribute,
int type,
boolean signed)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Tells if two attributes are equal. |
int |
getType()
Tells if the number is of type integer, fixed-point or floating-point |
boolean |
isSigned()
Tells if the data type is signed |
Methods inherited from class javax.microedition.broadcast.esg.Attribute |
---|
getName |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int FIXED_POINT_TYPE
FIXED_POINT_TYPE
references fixed-point numbers (e.g decimal numbers like prices with unit and currency)
public static final int FLOATING_POINT_TYPE
FLOATING_POINT_TYPE
references floating-point numbers
public static final int INTEGER_TYPE
INTEGER_TYPE
references integer numbers
Constructor Detail |
---|
public NumericAttribute(java.lang.String attribute, int type, boolean signed)
attribute
- The actual string representation of the
attribute as defined in the broadcast spec.type
- The type of number (decimal or integer)signed
- True if the number is signed, false if not signed
java.lang.IllegalArgumentException
- if type
is unrecognized.
java.lang.NullPointerException
- if attribute
is null
Method Detail |
---|
public boolean equals(java.lang.Object obj)
equals
in class Attribute
true
if obj
is NumericAttribute
,
its getType()
returns same type as this attribute and
its name and sign are the same as the name and sign of of this attribute, respecptively.
Otherwise false
is returned.
Comparison of the names is not case sensitive.public int getType()
public boolean isSigned()
|
Copyright 2008 Motorola Inc. and Nokia Corporation. All Rights Reserved. Specification License |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |