@API.Public @API.NotThreadSafe public interface Value extends JsonString
| Modifier and Type | Interface and Description | 
|---|---|
static class  | 
Value.Type  | 
| Modifier and Type | Field and Description | 
|---|---|
static String | 
TAG_BINARY  | 
static String | 
TAG_BYTE  | 
static String | 
TAG_DATE  | 
static String | 
TAG_DECIMAL  | 
static String | 
TAG_FLOAT  | 
static String | 
TAG_INT  | 
static String | 
TAG_INTERVAL  | 
static String | 
TAG_LONG  | 
static String | 
TAG_SHORT  | 
static String | 
TAG_TIME  | 
static String | 
TAG_TIMESTAMP  | 
static byte | 
TYPE_CODE_ARRAY  | 
static byte | 
TYPE_CODE_BINARY  | 
static byte | 
TYPE_CODE_BOOLEAN  | 
static byte | 
TYPE_CODE_BYTE  | 
static byte | 
TYPE_CODE_DATE  | 
static byte | 
TYPE_CODE_DECIMAL  | 
static byte | 
TYPE_CODE_DOUBLE  | 
static byte | 
TYPE_CODE_FLOAT  | 
static byte | 
TYPE_CODE_INT  | 
static byte | 
TYPE_CODE_INTERVAL  | 
static byte | 
TYPE_CODE_LONG  | 
static byte | 
TYPE_CODE_MAP  | 
static byte | 
TYPE_CODE_NULL  | 
static byte | 
TYPE_CODE_SHORT  | 
static byte | 
TYPE_CODE_STRING  | 
static byte | 
TYPE_CODE_TIME  | 
static byte | 
TYPE_CODE_TIMESTAMP  | 
| Modifier and Type | Method and Description | 
|---|---|
DocumentReader | 
asReader()
Returns a  
DocumentReader over the current document. | 
ByteBuffer | 
getBinary()
Returns the value as a  
ByteBuffer. | 
boolean | 
getBoolean()
Returns the value as a  
boolean. | 
byte | 
getByte()
Returns the value as a  
byte. | 
ODate | 
getDate()
Returns the value as a  
ODate object. | 
int | 
getDateAsInt()
Returns a  
int representing the number of DAYS since Unix epoch. | 
BigDecimal | 
getDecimal()
Returns the value as a  
BigDecimal. | 
double | 
getDouble()
Returns the value as a  
double. | 
float | 
getFloat()
Returns the value as a  
float. | 
int | 
getInt()
Returns the value as an  
int. | 
OInterval | 
getInterval()
Returns the value as a  
OInterval object. | 
long | 
getIntervalAsLong()
Returns a  
long representing interval duration in milliseconds. | 
List<Object> | 
getList()
Returns the value as a  
List<Object>. | 
long | 
getLong()
Returns the value as a  
long. | 
Map<String,Object> | 
getMap()
Returns the value as a  
Map. | 
Object | 
getObject()
Returns the value as an  
Object of the underlying type. | 
short | 
getShort()
Returns the value as a  
short. | 
String | 
getString()
Returns the value as a  
String. | 
OTime | 
getTime()
Returns the value as a  
OTime object. | 
int | 
getTimeAsInt()
Returns a  
int representing the number of milliseconds since midnight. | 
OTimestamp | 
getTimestamp()
Returns the value as a  
OTimestamp object. | 
long | 
getTimestampAsLong()
Returns a long value representing the number of milliseconds since epoch. 
 | 
Value.Type | 
getType()  | 
asJsonString, asJsonStringstatic final byte TYPE_CODE_NULL
static final byte TYPE_CODE_BOOLEAN
static final byte TYPE_CODE_STRING
static final byte TYPE_CODE_BYTE
static final byte TYPE_CODE_SHORT
static final byte TYPE_CODE_INT
static final byte TYPE_CODE_LONG
static final byte TYPE_CODE_FLOAT
static final byte TYPE_CODE_DOUBLE
static final byte TYPE_CODE_DECIMAL
static final byte TYPE_CODE_DATE
static final byte TYPE_CODE_TIME
static final byte TYPE_CODE_TIMESTAMP
static final byte TYPE_CODE_INTERVAL
static final byte TYPE_CODE_BINARY
static final byte TYPE_CODE_MAP
static final byte TYPE_CODE_ARRAY
static final String TAG_BINARY
static final String TAG_INTERVAL
static final String TAG_TIMESTAMP
static final String TAG_TIME
static final String TAG_DATE
static final String TAG_DECIMAL
static final String TAG_LONG
static final String TAG_BYTE
static final String TAG_SHORT
static final String TAG_INT
static final String TAG_FLOAT
Value.Type getType()
Type of this Valuebyte getByte()
byte.TypeException - if this value is not one of the numeric typesshort getShort()
short.TypeException - if this value is not one of the numeric typesint getInt()
int.TypeException - if this value is not one of the numeric typeslong getLong()
long.TypeException - if this value is not one of the numeric typesfloat getFloat()
float.TypeException - if this value is not one of the numeric typesdouble getDouble()
double.TypeException - if this value is not one of the numeric typesBigDecimal getDecimal()
BigDecimal.TypeException - if this value is not one of the numeric typesboolean getBoolean()
boolean.TypeException - if this value is not of BOOLEAN typeString getString()
String.TypeException - if this value is not of STRING typeOTimestamp getTimestamp()
OTimestamp object.TypeException - if this value is not of TIMESTAMP typelong getTimestampAsLong()
TypeException - if this value is not of TIMESTAMP typeODate getDate()
ODate object.TypeException - if this value is not of DATE typeint getDateAsInt()
int representing the number of DAYS since Unix epoch.TypeException - if this value is not of DATE typeOTime getTime()
OTime object. Modifying the
 returned object does not alter the content of the Value.TypeException - if this value is not of TIME typeint getTimeAsInt()
int representing the number of milliseconds since midnight.TypeException - if this value is not of TIME typeOInterval getInterval()
OInterval object.
 Modifying the returned object does not alter the content of the Value.TypeException - if this value is not of INTERVAL typelong getIntervalAsLong()
long representing interval duration in milliseconds.TypeException - if this value is not of INTERVAL typeByteBuffer getBinary()
ByteBuffer. Modifying the
 returned object does not alter the content of the Value.TypeException - if this value is not of BINARY typeMap<String,Object> getMap()
Map. The returned
 Map could be mutable or immutable however, modifying the returned Map
 does not alter the content of the Value.TypeException - if this value is not of MAP typeList<Object> getList()
List<Object>. The returned List
 could be mutable or immutable however, modifying the returned List does
 not alter the content of the Value.TypeException - if this value is not of ARRAY typeObject getObject()
Object of the underlying type.
 Type.NULL => null Type.BOOLEAN => Boolean Type.STRING => String Type.BYTE => Byte Type.SHORT => Short Type.INT => Integer Type.LONG => Long Type.FLOAT => Float Type.DOUBLE => Double Type.DECIMAL => BigDecimal Type.DATE => org.ojai.types.ODate Type.TIME => org.ojai.types.OTime Type.TIMESTAMP => org.ojai.types.OTimestamp Type.INTERVAL => org.ojai.types.OInterval Type.BINARY => java.nio.ByteBuffer Type.MAP => Map<String, Object> Type.ARRAY => List<Object>
DocumentReader asReader()
DocumentReader over the current document.Copyright © 2015–2018 MapR Technologies, Inc.. All rights reserved.