org.axiondb.types

Class BooleanType

public class BooleanType extends BaseDataType

A DataTyperepresenting a Boolean value.

Version: $Revision: 1.15 $ $Date: 2005/10/13 02:25:32 $

Author: Rodney Waldhoff Ahimanikya Satapathy

Constructor Summary
BooleanType()
Method Summary
booleanaccepts(Object value)
Returns true iff value is null, or a Boolean.
Objectconvert(Object value)
Returns a Boolean converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.
intgetColumnDisplaySize()
ComparatorgetComparator()
intgetJdbcType()
intgetPrecision()
StringgetPreferredValueClassName()
DataTypemakeNewInstance()
Objectread(DataInput in)
booleantoBoolean(Object value)
StringtoString()
Returns "boolean"
voidwrite(Object value, DataOutput out)
Writes the given value to the given DataOutput.

Constructor Detail

BooleanType

public BooleanType()

Method Detail

accepts

public boolean accepts(Object value)
Returns true iff value is null, or a Boolean.

convert

public Object convert(Object value)
Returns a Boolean converted from the given value , or throws IllegalArgumentExceptionif the given value isn't acceptable.

getColumnDisplaySize

public int getColumnDisplaySize()

getComparator

public Comparator getComparator()

getJdbcType

public int getJdbcType()

Returns: Types#BOOLEAN

getPrecision

public int getPrecision()

getPreferredValueClassName

public String getPreferredValueClassName()

makeNewInstance

public DataType makeNewInstance()

read

public Object read(DataInput in)

See Also: BooleanType

toBoolean

public boolean toBoolean(Object value)

toString

public String toString()
Returns "boolean"

Returns: "boolean"

write

public void write(Object value, DataOutput out)
Writes the given value to the given DataOutput. Null values are written as (byte)-1, false values are written as (byte)0, true values are written as (byte)1.

Parameters: value the value to write, which must be acceptable