Modifier and Type | Class and Description |
---|---|
class |
RecordmInstance.Field
Represents a field from an Instance.
|
Constructor and Description |
---|
RecordmInstance(Map<String,Object> instance) |
Modifier and Type | Method and Description |
---|---|
RecordmInstance.Field |
field(String name)
Selects a field by name.
|
Object |
get(String name)
The value of a matching property.
|
List<Map<String,Object>> |
getFields()
Returns all fields.
|
Integer |
getId()
The instance identifier
|
Map<String,Object> |
getRaw()
Get the raw representation of the instance as a
Map . |
String |
toString() |
String |
value(Function<Map<String,Object>,Boolean> predicate)
The first value of a matching field.
|
String |
value(String name)
The first value of a matching field.
|
Object |
value(String name,
Class aClass)
The first value of a matching field converted to a specific type.
|
List<String> |
values(Function<Map<String,Object>,Boolean> predicate)
Get all the values of fields that match a predicate.
|
List<String> |
values(String name)
Get all the values of fields with the specified name.
|
List<Object> |
values(String name,
Class aClass)
Get all the values of fields with the specified name.
|
public RecordmInstance.Field field(String name)
name
- the name of the fieldpublic Object get(String name)
name
- the name of the propertypublic List<Map<String,Object>> getFields()
RecordmInstance
is built with the output
of a RecordmActionPack.get(int)
.public Integer getId()
public String value(Function<Map<String,Object>,Boolean> predicate)
public String value(String name)
name
- the name of the fieldvalue(String, Class)
}
to get the value as a specific typepublic Object value(String name, Class aClass)
name
- the name of the fieldaClass
- the type to convert the field topublic List<String> values(Function<Map<String,Object>,Boolean> predicate)
public List<String> values(String name)
name
- the name of the field(s)values(String, Class)
}
to get the values as a specific typepublic List<Object> values(String name, Class aClass)
name
- the name of the field(s)aClass
- the type to convert the field to.
See value(String, Class)
for supported types.Copyright © 2021 Cult Of Bits, lda