All Packages Class Hierarchy This Package Previous Next Index
Class oracle.jsp.jml.JmlNumber
oracle.jsp.jml.JmlNumber
- public final class 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:
- inability to attach Java primitive types on JSP scope (objects).
- inability to declare most
java.lang.* objects using
- inability to modify a
java.lang.* object's value after created.
-
JmlNumber()
- Constructs a default
JmlNumber object.
-
JmlNumber(int)
- Constructs a
JmlNumber object whose value is
int.
-
JmlNumber(Integer)
- Constructs a
JmlNumber object whose value is
java.lang.Integer.
-
JmlNumber(JmlNumber)
- Constructs a
JmlNumber object whose value is
JmlNumber.
-
JmlNumber(String)
- Constructs a
JmlNumber object whose value is
java.lang.String.
-
equals(int)
- Tests whether the beans's
value property is equal to
int.
-
getValue()
- Returns the beans's
value property as a
int.
-
setTypedValue(Integer)
- Sets the beans's
value property to the
java.lang.Integer.
-
setTypedValue(JmlNumber)
- Sets the beans's
value property to the
JmlNumber.
-
setTypedValue(String)
- Sets the beans's
value property to the
java.lang.String.
-
setValue(int)
- Sets the beans's
value property to the
int.
-
toString()
- Returns the beans's
value property as a
java.lang.String.
-
typedEquals(Integer)
- Tests whether the beans's
value property is equal to
java.lang.Integer.
-
typedEquals(JmlNumber)
- Tests whether the beans's
value property is equal to
JmlNumber.
-
typedEquals(String)
- Tests whether the beans's
value property is equal to
java.lang.String.
JmlNumber
public JmlNumber()
- Constructs a default
JmlNumber object. The object's default
value is 0.
JmlNumber
public JmlNumber(int num)
- Constructs a
JmlNumber object whose value is
int.
JmlNumber
public JmlNumber(String num)
- Constructs a
JmlNumber object whose value is
java.lang.String. Conversion is equivalent to
java.lang.Integer.decode().
JmlNumber
public JmlNumber(Integer num)
- Constructs a
JmlNumber object whose value is
java.lang.Integer.
JmlNumber
public JmlNumber(JmlNumber num)
- Constructs a
JmlNumber object whose value is
JmlNumber.
getValue
public int getValue()
- Returns the beans's
value property as a
int.
setValue
public void setValue(int num)
- Sets the beans's
value property to the
int.
setTypedValue
public void setTypedValue(String num)
- Sets the beans's
value property to the
java.lang.String. Conversion occurs according to
the same rules as java.lang.Integer.decode().
setTypedValue
public void setTypedValue(Integer num)
- Sets the beans's
value property to the
java.lang.Integer.
setTypedValue
public void setTypedValue(JmlNumber num)
- Sets the beans's
value property to the
JmlNumber.
equals
public boolean equals(int num)
- Tests whether the beans's
value property is equal to
int.
typedEquals
public boolean typedEquals(Integer num)
- Tests whether the beans's
value property is equal to
java.lang.Integer.
typedEquals
public boolean typedEquals(String num)
- Tests whether the beans's
value property is equal to
java.lang.String. The comparison is made after converting
the java.lang.String to a JmlNumber.
typedEquals
public boolean typedEquals(JmlNumber num)
- Tests whether the beans's
value property is equal to
JmlNumber.
toString
public String toString()
- Returns the beans's
value property as a
java.lang.String. The java.lang.String
is represented as java.lang.Integer.toString().
All Packages Class Hierarchy This Package Previous Next Index