public abstract class AbstractLiteral extends Object implements Literal
Literal, offering common functionality.| Constructor and Description |
|---|
AbstractLiteral() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
booleanValue()
Returns the boolean value of this literal.
|
byte |
byteValue()
Returns the byte value of this literal.
|
XMLGregorianCalendar |
calendarValue()
Returns the
XMLGregorianCalendar value of this literal. |
BigDecimal |
decimalValue()
Returns the decimal value of this literal.
|
double |
doubleValue()
Returns the double value of this literal.
|
boolean |
equals(Object o)
Compares this literal to another object.
|
float |
floatValue()
Returns the float value of this literal.
|
int |
hashCode()
Computes the hash code of this literal.
|
BigInteger |
integerValue()
Returns the integer value of this literal.
|
int |
intValue()
Returns the int value of this literal.
|
long |
longValue()
Returns the long value of this literal.
|
short |
shortValue()
Returns the short value of this literal.
|
String |
stringValue()
Returns the String-value of a Value object.
|
String |
toString() |
protected <V> V |
value(java.util.function.Function<String,V> mapper)
Converts this literal to a value.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, waitgetDatatype, getLabel, getLanguage, isLiteralisBNode, isIRI, isResource, isTripleprotected <V> V value(java.util.function.Function<String,V> mapper)
V - the expected value typemapper - a function mapping from the label of this literal to its value; returns a null value or
throws an IllegalArgumentException if the label of this literal doesn't represent a value
of the expected typemapperNullPointerException - if mapper is nullpublic String stringValue()
ValueLiteral's label, a
IRI's URI or a BNode's ID.stringValue in interface Valuepublic boolean booleanValue()
LiteralbooleanValue in interface Literalpublic byte byteValue()
Literalpublic short shortValue()
LiteralshortValue in interface Literalpublic int intValue()
Literalpublic long longValue()
Literalpublic float floatValue()
LiteralfloatValue in interface Literalpublic double doubleValue()
LiteraldoubleValue in interface Literalpublic BigInteger integerValue()
LiteralintegerValue in interface Literalpublic BigDecimal decimalValue()
LiteraldecimalValue in interface Literalpublic XMLGregorianCalendar calendarValue()
LiteralXMLGregorianCalendar value of this literal. A calendar representation can be given for
literals whose label conforms to the syntax of the following XML
Schema datatypes: dateTime, time, date, gYearMonth, gMonthDay,
gYear, gMonth or gDay.calendarValue in interface Literalpublic boolean equals(Object o)
Literalpublic int hashCode()
LiteralhashCode in interface LiteralhashCode in class ObjectLiteral.getLabel().hashCode()Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.