org.apache.jackrabbit.rmi.value
Class BooleanValue

java.lang.Object
  extended byorg.apache.jackrabbit.rmi.value.BaseNonStreamValue
      extended byorg.apache.jackrabbit.rmi.value.BooleanValue
All Implemented Interfaces:
Serializable, StatefulValue, Value

public class BooleanValue
extends BaseNonStreamValue
implements Serializable, StatefulValue

The BooleanValue class implements the committed value state for Boolean values as a part of the State design pattern (Gof) used by this package.

Since:
0.16.4.1
See Also:
SerialValue, Serialized Form

Constructor Summary
protected BooleanValue(boolean value)
          Creates an instance for the given boolean value.
protected BooleanValue(String value)
          Creates an instance for the given string representation of a boolean.
 
Method Summary
 boolean getBoolean()
          Returns the boolean value.
 String getString()
          Returns the boolean as a string converted by the Boolean.toString(boolean).
 int getType()
          Returns PropertyType.BOOLEAN.
protected static boolean toBoolean(String value)
          Returns the boolean value represented by the string value.
 
Methods inherited from class org.apache.jackrabbit.rmi.value.BaseNonStreamValue
getDate, getDouble, getLong, getStream, getValueFormatException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.jcr.Value
getDate, getDouble, getLong, getStream
 

Constructor Detail

BooleanValue

protected BooleanValue(boolean value)
Creates an instance for the given boolean value.


BooleanValue

protected BooleanValue(String value)
Creates an instance for the given string representation of a boolean.

Calls toBoolean(String) to convert the string to a boolean.

Method Detail

toBoolean

protected static boolean toBoolean(String value)
Returns the boolean value represented by the string value.

This implementation uses the Boolean.valueOf(String) method to convert the string to a boolean.


getType

public int getType()
Returns PropertyType.BOOLEAN.

Specified by:
getType in interface Value

getBoolean

public boolean getBoolean()
Returns the boolean value.

Specified by:
getBoolean in interface Value
Overrides:
getBoolean in class BaseNonStreamValue
Returns:
nothing

getString

public String getString()
Returns the boolean as a string converted by the Boolean.toString(boolean).

Specified by:
getString in interface Value


Copyright © 2004-2006 . All Rights Reserved.