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(Class<T> clazz)
An io shortcut method to get the contents as an object
of the specified type, which must be a registered type.
|
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.
|
Number |
getNumber()
This result parsed to a Number.
|
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(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.String getString()
Number getNumber()
Boolean getBoolean()
getString()
)Copyright © 2013-2016 MarkLogic Corporation.