|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--oracle.jsp.jml.JmlNumber
JmlNumber wraps the primitive type int
in a Java bean. It has
a single property, value
that represents the bean's typed value.
It is designed to work more effectively in JSPs than Java primitive types
or their corresponding wrapper java.lang.*
objects. Specifically,
JmlNumber overcomes:
java.lang.*
objects using java.lang.*
object's value after created.
Constructor Summary | |
JmlNumber()
Constructs a default JmlNumber object. |
|
JmlNumber(int num)
Constructs a JmlNumber object whose value is
int . |
|
JmlNumber(java.lang.Integer num)
Constructs a JmlNumber object whose value is
java.lang.Integer . |
|
JmlNumber(JmlNumber num)
Constructs a JmlNumber object whose value is
JmlNumber . |
|
JmlNumber(java.lang.String num)
Constructs a JmlNumber object whose value is
java.lang.String . |
Method Summary | |
boolean |
equals(int num)
Tests whether the beans's value property is equal to
int . |
int |
getValue()
Returns the beans's value property as a
int . |
void |
setTypedValue(int num)
Sets the beans's value property to the
int . |
void |
setTypedValue(java.lang.Integer num)
Sets the beans's value property to the
java.lang.Integer . |
void |
setTypedValue(JmlNumber num)
Sets the beans's value property to the
JmlNumber . |
void |
setTypedValue(java.lang.String num)
Sets the beans's value property to the
java.lang.String . |
void |
setValue(int num)
Sets the beans's value property to the
int . |
java.lang.String |
toString()
Returns the beans's value property as a
java.lang.String . |
boolean |
typedEquals(java.lang.Integer num)
Tests whether the beans's value property is equal to
java.lang.Integer . |
boolean |
typedEquals(JmlNumber num)
Tests whether the beans's value property is equal to
JmlNumber . |
boolean |
typedEquals(java.lang.String num)
Tests whether the beans's value property is equal to
java.lang.String . |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Constructor Detail |
public JmlNumber()
JmlNumber
object. The object's default
value
is 0
.public JmlNumber(int num)
JmlNumber
object whose value is
int
.public JmlNumber(java.lang.String num)
JmlNumber
object whose value is
java.lang.String
. Conversion is equivalent to
java.lang.Integer.valueOf()
.public JmlNumber(java.lang.Integer num)
JmlNumber
object whose value is
java.lang.Integer
.public JmlNumber(JmlNumber num)
JmlNumber
object whose value is
JmlNumber
.Method Detail |
public int getValue()
value
property as a
int
.public void setValue(int num)
value
property to the
int
.public void setTypedValue(java.lang.String num)
value
property to the
java.lang.String
. Conversion occurs according to
the same rules as java.lang.Integer.valueOf()
.public void setTypedValue(java.lang.Integer num)
value
property to the
java.lang.Integer
.public void setTypedValue(int num)
value
property to the
int
.public void setTypedValue(JmlNumber num)
value
property to the
JmlNumber
.public boolean equals(int num)
value
property is equal to
int
.public boolean typedEquals(java.lang.Integer num)
value
property is equal to
java.lang.Integer
.public boolean typedEquals(java.lang.String num)
value
property is equal to
java.lang.String
. The comparison is made after converting
the java.lang.String
to a JmlNumber
.public boolean typedEquals(JmlNumber num)
value
property is equal to
JmlNumber
.public java.lang.String toString()
value
property as a
java.lang.String
. The java.lang.String
is represented as java.lang.Integer.toString()
.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |