public interface EvalResult
eval
. Also includes some convenience methods for
deserializing the result as a String, Number, Boolean,
AbstractReadHandle, or an object of any Class which is registered
by a ContentHandle.Modifier and Type | Interface and Description |
---|---|
static class |
EvalResult.Type
Convenience enum useful for strongly-typed
comparison to ensure the result is of the type expected.
|
Modifier and Type | Method and Description |
---|---|
<H extends AbstractReadHandle> |
get(H handle)
Use a handle to retrieve the contents of this
result.
|
<T> T |
getAs(java.lang.Class<T> clazz)
An io shortcut method to get the contents as an
object of the specified type, which must be a registered
type.
|
java.lang.Boolean |
getBoolean()
This result parsed to a Boolean.
|
Format |
getFormat()
The format of this result from the Content-Type
header provided by the REST API eval endpoint.
|
java.lang.Number |
getNumber()
This result parsed to a Number.
|
java.lang.String |
getString()
This result directly as a string.
|
EvalResult.Type |
getType()
The
EvalResult.Type
of this result from the X-Primitive header provided by the REST API
eval endpoint. |
EvalResult.Type getType()
EvalResult.Type
of this result from the X-Primitive header provided by the REST API
eval endpoint.Format getFormat()
<H extends AbstractReadHandle> H get(H handle)
H
- the type of AbstractReadHandle to returnhandle
- the handle to populate with the contents
of this result<T> T getAs(java.lang.Class<T> clazz)
T
- the type of object that will be returned by
the handle registered for itclazz
- the Class (type). This type must be
registered by an io handle.java.lang.String getString()
java.lang.Number getNumber()
java.lang.Boolean getBoolean()
getString()
)Copyright © 2024 MarkLogic Corporation. All Rights Reserved.