public abstract class IntegerCastFunction extends CastFunction
CastFunction
s that cast their arguments to an xsd:integer or one of its derived
types.Constructor and Description |
---|
IntegerCastFunction() |
Modifier and Type | Method and Description |
---|---|
protected Literal |
convert(ValueFactory valueFactory,
Value value)
Convert the supplied value to a literal of the function output datatype.
|
protected abstract Optional<Literal> |
createTypedLiteral(ValueFactory vf,
BigInteger integerValue)
create a
Literal with the specific datatype for the supplied BigInteger value. |
protected Optional<Literal> |
createTypedLiteral(ValueFactory vf,
boolean booleanValue)
create a
Literal with the specific datatype for the supplied boolean value. |
evaluate, getURI, getXsdDatatype, getXsdName, isValidForDatatype, typeError
protected Literal convert(ValueFactory valueFactory, Value value) throws ValueExprEvaluationException
CastFunction
convert
in class CastFunction
valueFactory
- the valueFactory to usevalue
- a value that is not a string-typed literal, and not a literal of the same datatype as the function
output datatype.ValueExprEvaluationException
- if an error occurs in conversion.protected abstract Optional<Literal> createTypedLiteral(ValueFactory vf, BigInteger integerValue) throws ArithmeticException
Literal
with the specific datatype for the supplied BigInteger
value.vf
- the ValueFactory
to use for creating the Literal
integerValue
- the integer value to use for creating the Literal
Optional
literal value, which may be empty if the supplied integerValue can not be
successfully converted to the specific datatype.ArithmeticException
- if an error occurs when attempting to convert the supplied value to a value of the
specific datatype.protected Optional<Literal> createTypedLiteral(ValueFactory vf, boolean booleanValue)
Literal
with the specific datatype for the supplied boolean value.vf
- the ValueFactory
to use for creating the Literal
booleanValue
- the boolean value to use for creating the Literal
Optional
literal value, which may be empty if the supplied boolean value can not be
successfully converted to the specific datatype.Copyright © 2015-2019 Eclipse Foundation. All Rights Reserved.