Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference
10g Release 2 (10.1.2)

B14015-02


oracle.jsp.jml
Class JmlBoolean

java.lang.Object
  extended byoracle.jsp.jml.JmlBoolean

All Implemented Interfaces:
java.io.Serializable

public final class JmlBoolean
extends java.lang.Object
implements java.io.Serializable

JmlBoolean wraps the primitive type boolean 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, JmlBoolean overcomes:

See Also:
Serialized Form

Field Summary
static JmlBoolean FALSE
The JmlBoolean object corresponding to the primitive value false.
static JmlBoolean TRUE
The JmlBoolean object corresponding to the primitive value true.

Constructor Summary
JmlBoolean()
Constructs a default JmlBoolean object.
JmlBoolean(boolean bool)
Constructs a JmlBoolean object whose value is boolean.
JmlBoolean(java.lang.Boolean bool)
Constructs a JmlBoolean object whose value is java.lang.Boolean .
JmlBoolean(JmlBoolean bool)
Constructs a JmlBoolean object whose value is taken from another JmlBoolean .
JmlBoolean(java.lang.String bool)
Constructs a JmlBoolean object whose value is represented by java.lang.String.

Method Summary
boolean equals(boolean bool)
Tests whether the beans's value property is equal to boolean.
boolean getValue()
Returns the beans's value property as a boolean.
void setTypedValue(boolean bool)
Sets the beans's value property to the boolean.
void setTypedValue(java.lang.Boolean bool)
Sets the beans's value property to the java.lang.Boolean.
void setTypedValue(JmlBoolean bool)
Sets the beans's value property to the JmlBoolean.
void setTypedValue(java.lang.String bool)
Sets the beans's value property to the java.lang.String.
void setValue(boolean bool)
Sets the beans's value property to the boolean.
java.lang.String toString()
Returns the beans's value property as a java.lang.String.
boolean typedEquals(java.lang.Boolean bool)
Tests whether the beans's value property is equal to java.lang.Boolean.
boolean typedEquals(JmlBoolean bool)
Tests whether the beans's value property is equal to JmlBoolean.
boolean typedEquals(java.lang.String bool)
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

Field Detail

TRUE

public static final JmlBoolean TRUE
The JmlBoolean object corresponding to the primitive value true.

FALSE

public static final JmlBoolean FALSE
The JmlBoolean object corresponding to the primitive value false.

Constructor Detail

JmlBoolean

public JmlBoolean()
Constructs a default JmlBoolean object. The object's default value is false.

JmlBoolean

public JmlBoolean(boolean bool)
Constructs a JmlBoolean object whose value is boolean.

JmlBoolean

public JmlBoolean(java.lang.String bool)
Constructs a JmlBoolean object whose value is represented by java.lang.String. The value is converted according to the same rules as the java.lang.Boolean String constructor.

JmlBoolean

public JmlBoolean(java.lang.Boolean bool)
Constructs a JmlBoolean object whose value is java.lang.Boolean .

JmlBoolean

public JmlBoolean(JmlBoolean bool)
Constructs a JmlBoolean object whose value is taken from another JmlBoolean .

Method Detail

getValue

public boolean getValue()
Returns the beans's value property as a boolean.

setValue

public void setValue(boolean bool)
Sets the beans's value property to the boolean.

setTypedValue

public void setTypedValue(java.lang.String bool)
Sets the beans's value property to the java.lang.String. Conversion occurs according to the same rules as java.lang.Boolean.valueOf().

setTypedValue

public void setTypedValue(java.lang.Boolean bool)
Sets the beans's value property to the java.lang.Boolean.

setTypedValue

public void setTypedValue(boolean bool)
Sets the beans's value property to the boolean.

setTypedValue

public void setTypedValue(JmlBoolean bool)
Sets the beans's value property to the JmlBoolean.

equals

public boolean equals(boolean bool)
Tests whether the beans's value property is equal to boolean.

typedEquals

public boolean typedEquals(java.lang.Boolean bool)
Tests whether the beans's value property is equal to java.lang.Boolean.

typedEquals

public boolean typedEquals(java.lang.String bool)
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 JmlBoolean.

typedEquals

public boolean typedEquals(JmlBoolean bool)
Tests whether the beans's value property is equal to JmlBoolean.

toString

public java.lang.String toString()
Returns the beans's value property as a java.lang.String. If true then "true" is returned. If false then "false" is returned.

Oracle Application Server Containers for J2EE Support for JavaServer Pages API Reference
10g Release 2 (10.1.2)

B14015-02


Copyright © 2004, 2005, Oracle. All rights reserved.