public abstract class AbstractDerivedIntegerType extends AbstractBaseDatatype<Number>
Title: Abstract derived integer type
Description: Base implementation for integer datatypes derived from
xsd:decimal
Copyright: Copyright (c) 2009
Company: Clark & Parsia, LLC.
| Constructor and Description |
|---|
AbstractDerivedIntegerType(aterm.ATermAppl name,
Number lower,
Number upper) |
| Modifier and Type | Method and Description |
|---|---|
RestrictedDatatype<Number> |
asDataRange()
Get the canonical data range for a datatype
|
protected abstract Number |
fromLexicalForm(String lexicalForm)
Parse and validate a lexical form of the literal.
|
aterm.ATermAppl |
getCanonicalRepresentation(aterm.ATermAppl input)
Get the canonical representation of a lexical form
|
aterm.ATermAppl |
getLiteral(Object value)
Get the canonical
ATermAppl literal representation for a value
space object. |
Datatype<?> |
getPrimitiveDatatype()
Get the primitive datatype associated with this datatype.
|
Number |
getValue(aterm.ATermAppl literal)
Get the Java object representation of a data value
|
boolean |
isPrimitive()
Check if a datatype is primitive.
|
equals, getLexicalForm, getName, hashCodepublic RestrictedDatatype<Number> asDataRange()
DatatypeDataRange representation of the datatype value spaceprotected abstract Number fromLexicalForm(String lexicalForm) throws InvalidLiteralException
lexicalForm - Number representation of the literalInvalidLiteralException - if the literal form is invalid or the value is out of rangepublic aterm.ATermAppl getCanonicalRepresentation(aterm.ATermAppl input)
throws InvalidLiteralException
Datatypeinput - a lexical form of the literalInvalidLiteralExceptionpublic aterm.ATermAppl getLiteral(Object value)
DatatypeATermAppl literal representation for a value
space object. This may be unsupported by datatypes for which
Datatype.isPrimitive() returns false.value - Element of the value space for some datatypeATermAppl representation of valuepublic Datatype<?> getPrimitiveDatatype()
Datatypethis if isPrimitive() == true, else a
primitive datatype that is a superset of the value space of this
datatype.public Number getValue(aterm.ATermAppl literal) throws InvalidLiteralException
Datatypeliteral - the literalInvalidLiteralExceptionpublic boolean isPrimitive()
Datatypetrue if the datatype is primitive,
false elseCopyright © 2019. All rights reserved.