org.openrdf.model.impl
Class BooleanLiteralImpl

java.lang.Object
  extended by org.openrdf.model.impl.LiteralImpl
      extended by org.openrdf.model.impl.BooleanLiteralImpl
All Implemented Interfaces:
Serializable, Literal, Value

public class BooleanLiteralImpl
extends LiteralImpl

An extension of LiteralImpl that stores a boolean value to avoid parsing.

Author:
David Huynh, Arjohn Kampman
See Also:
Serialized Form

Field Summary
static BooleanLiteralImpl FALSE
           
static BooleanLiteralImpl TRUE
           
 
Constructor Summary
BooleanLiteralImpl(boolean value)
          Creates an xsd:boolean typed literal with the specified value.
 
Method Summary
 boolean booleanValue()
          Returns the boolean value of this literal.
static BooleanLiteralImpl valueOf(boolean value)
          Returns a BooleanLiteralImpl for the specified value.
 
Methods inherited from class org.openrdf.model.impl.LiteralImpl
byteValue, calendarValue, decimalValue, doubleValue, equals, floatValue, getDatatype, getLabel, getLanguage, hashCode, integerValue, intValue, longValue, setDatatype, setLabel, setLanguage, shortValue, stringValue, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

TRUE

public static final BooleanLiteralImpl TRUE

FALSE

public static final BooleanLiteralImpl FALSE
Constructor Detail

BooleanLiteralImpl

public BooleanLiteralImpl(boolean value)
Creates an xsd:boolean typed literal with the specified value.

Method Detail

booleanValue

public boolean booleanValue()
Description copied from interface: Literal
Returns the boolean value of this literal.

Specified by:
booleanValue in interface Literal
Overrides:
booleanValue in class LiteralImpl
Returns:
The long value of the literal.

valueOf

public static BooleanLiteralImpl valueOf(boolean value)
Returns a BooleanLiteralImpl for the specified value. This method uses the constants TRUE and FALSE as result values, preventing the often unnecessary creation of new BooleanLiteralImpl objects.



Copyright © 2001-2008 Aduna. All Rights Reserved.