Qore jni Module 2.4.0
Loading...
Searching...
No Matches
org.qore.jni.Hash Class Reference

Java Hash class to make it easier to work with Qore hash data. More...

Inherits LinkedHashMap< String, Object >.

Public Member Methods

 Hash ()
 Creates the object.
 
 Hash (Map< String, Object > m)
 Creates the object.
 
boolean getBool (String key)
 Returns the given key as a boolean.
 
int getByte (String key)
 Returns the given key as a byte.
 
char getChar (String key)
 Returns the given key as a char.
 
short getShort (String key)
 Returns the given key as a short.
 
int getInt (String key)
 Returns the given key as an int.
 
long getLong (String key)
 Returns the given key as a long.
 
float getFloat (String key)
 Returns the given key as a float.
 
double getDouble (String key)
 Returns the given key as a double.
 
String getString (String key)
 Returns the given key as a String.
 
ArrayList< Object > getList (String key)
 Returns the given key as an array.
 
ZonedDateTime getADate (String key)
 Returns the given key as an absolute date/time value.
 
QoreRelativeTime getRDate (String key)
 Returns the given key as a relative date/time value.
 
BigDecimal getNumber (String key)
 Returns the given key as an arbitrary-precision numeric value.
 
byte[] getBinary (String key)
 Returns the given key as a byte array.
 
Hash getHash (String key)
 Returns the given key as a hash.
 
QoreClosureMarker getCode (String key)
 Returns the given key as a callable value.
 
boolean getAsBool (String key)
 Returns the given key as a boolean.
 
byte getAsByte (String key)
 Returns the given key as a byte.
 
short getAsShort (String key)
 Returns the given key as a short.
 
int getAsInt (String key)
 Returns the given key as an int.
 
long getAsLong (String key)
 Returns the given key as a long.
 
float getAsFloat (String key)
 Returns the given key as a float.
 
double getAsDouble (String key)
 Returns the given key as a double.
 
String getAsString (String key)
 Returns the given key as a String.
 

Static Public Member Methods

static Hash of ()
 Returns a modifiable map of zero entries.
 
static Hash of (String k0, Object v0)
 Returns a modifiable map of one entry.
 
static Hash of (String k0, Object v0, String k1, Object v1)
 Returns a modifiable map of two entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2)
 Returns a modifiable map of three entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3)
 Returns a modifiable map of four entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4)
 Returns a modifiable map of five entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4, String k5, Object v5)
 Returns a modifiable map of six entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4, String k5, Object v5, String k6, Object v6)
 Returns a modifiable map of seven entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4, String k5, Object v5, String k6, Object v6, String k7, Object v7)
 Returns a modifiable map of eight entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4, String k5, Object v5, String k6, Object v6, String k7, Object v7, String k8, Object v8)
 Returns a modifiable map of nine entries.
 
static Hash of (String k0, Object v0, String k1, Object v1, String k2, Object v2, String k3, Object v3, String k4, Object v4, String k5, Object v5, String k6, Object v6, String k7, Object v7, String k8, Object v8, String k9, Object v9)
 Returns a modifiable map of ten entries.
 

Detailed Description

Java Hash class to make it easier to work with Qore hash data.

Member Function Documentation

◆ getAsBool()

boolean org.qore.jni.Hash.getAsBool ( String  key)
inline

Returns the given key as a boolean.

Converts the type of the value if possible before returning

◆ getAsByte()

byte org.qore.jni.Hash.getAsByte ( String  key)
inline

Returns the given key as a byte.

Converts the type of the value if possible before returning

◆ getAsDouble()

double org.qore.jni.Hash.getAsDouble ( String  key)
inline

Returns the given key as a double.

Converts the type of the value if possible before returning

◆ getAsFloat()

float org.qore.jni.Hash.getAsFloat ( String  key)
inline

Returns the given key as a float.

Converts the type of the value if possible before returning

◆ getAsInt()

int org.qore.jni.Hash.getAsInt ( String  key)
inline

Returns the given key as an int.

Converts the type of the value if possible before returning

◆ getAsLong()

long org.qore.jni.Hash.getAsLong ( String  key)
inline

Returns the given key as a long.

Converts the type of the value if possible before returning

◆ getAsShort()

short org.qore.jni.Hash.getAsShort ( String  key)
inline

Returns the given key as a short.

Converts the type of the value if possible before returning

◆ getAsString()

String org.qore.jni.Hash.getAsString ( String  key)
inline

Returns the given key as a String.

Converts the type of the value if possible before returning

◆ getBool()

boolean org.qore.jni.Hash.getBool ( String  key)
inline

Returns the given key as a boolean.

See also
getAsBool()

◆ getByte()

int org.qore.jni.Hash.getByte ( String  key)
inline

Returns the given key as a byte.

See also
getAsByte()

◆ of() [1/11]

static Hash org.qore.jni.Hash.of ( )
inlinestatic

Returns a modifiable map of zero entries.

Since
jni 2.0

◆ of() [2/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0 
)
inlinestatic

Returns a modifiable map of one entry.

Since
jni 2.0

◆ of() [3/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1 
)
inlinestatic

Returns a modifiable map of two entries.

Since
jni 2.0

◆ of() [4/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2 
)
inlinestatic

Returns a modifiable map of three entries.

Since
jni 2.0

◆ of() [5/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3 
)
inlinestatic

Returns a modifiable map of four entries.

Since
jni 2.0

◆ of() [6/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4 
)
inlinestatic

Returns a modifiable map of five entries.

Since
jni 2.0

◆ of() [7/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4,
String  k5,
Object  v5 
)
inlinestatic

Returns a modifiable map of six entries.

Since
jni 2.0

◆ of() [8/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4,
String  k5,
Object  v5,
String  k6,
Object  v6 
)
inlinestatic

Returns a modifiable map of seven entries.

Since
jni 2.0

◆ of() [9/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4,
String  k5,
Object  v5,
String  k6,
Object  v6,
String  k7,
Object  v7 
)
inlinestatic

Returns a modifiable map of eight entries.

Since
jni 2.0

◆ of() [10/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4,
String  k5,
Object  v5,
String  k6,
Object  v6,
String  k7,
Object  v7,
String  k8,
Object  v8 
)
inlinestatic

Returns a modifiable map of nine entries.

Since
jni 2.0

◆ of() [11/11]

static Hash org.qore.jni.Hash.of ( String  k0,
Object  v0,
String  k1,
Object  v1,
String  k2,
Object  v2,
String  k3,
Object  v3,
String  k4,
Object  v4,
String  k5,
Object  v5,
String  k6,
Object  v6,
String  k7,
Object  v7,
String  k8,
Object  v8,
String  k9,
Object  v9 
)
inlinestatic

Returns a modifiable map of ten entries.

Since
jni 2.0

The documentation for this class was generated from the following file: