public class Group extends Object
| Modifier | Constructor and Description |
|---|---|
protected |
Group(Stack stack,
org.json.JSONObject jsonObject) |
| Modifier and Type | Method and Description |
|---|---|
Object |
get(String key)
Get object value for key.
|
ArrayList<Entry> |
getAllEntries(String refKey,
String refContentType)
Get value for the given reference key.
|
Asset |
getAsset(String key)
Get an asset from the group
|
List<Asset> |
getAssets(String key)
Get an assets from the group.
|
Boolean |
getBoolean(String key)
Get boolean value for key.
|
Calendar |
getDate(String key)
Get
Calendar value for key |
double |
getDouble(String key)
Get double value for key
|
float |
getFloat(String key)
Get integer value for key
|
Group |
getGroup(String key)
Get a group from the group.
|
List<Group> |
getGroups(String key)
Get a list of group from the group.
|
int |
getInt(String key)
Get integer value for key
|
org.json.JSONArray |
getJSONArray(String key)
Get
JSONArray value for key |
org.json.JSONObject |
getJSONObject(String key)
Get
JSONObject value for key |
long |
getLong(String key)
Get long value for key
|
Number |
getNumber(String key)
Get
JSONObject value for key |
short |
getShort(String key)
Get short value for key
|
String |
getString(String key)
Get string value for key.
|
org.json.JSONObject |
toJSON()
Get group representation in json
|
protected Group(Stack stack, org.json.JSONObject jsonObject)
public org.json.JSONObject toJSON()
JSONObject json = group.toJSON();
public Object get(String key)
key - field_uid as key.
Object obj = group.get("key");
public String getString(String key)
key - field_uid as key.
String value = group.getString("key");
public Boolean getBoolean(String key)
key - field_uid as key.
Boolean value = group.getBoolean("key");
public org.json.JSONArray getJSONArray(String key)
JSONArray value for keykey - field_uid as key.
JSONArray value = group.getJSONArray("key");
public org.json.JSONObject getJSONObject(String key)
JSONObject value for keykey - field_uid as key.
JSONObject value = group.getJSONObject("key");
public Number getNumber(String key)
JSONObject value for keykey - field_uid as key.
JSONObject value = group.getJSONObject("key");
public int getInt(String key)
key - field_uid as key.
int value = group.getInt("key");
public float getFloat(String key)
key - field_uid as key.
float value = group.getFloat("key");
public double getDouble(String key)
key - field_uid as key.
double value = group.getDouble("key");
public long getLong(String key)
key - field_uid as key.
long value = group.getLong("key");
public short getShort(String key)
key - field_uid as key.
short value = group.getShort("key");
public Calendar getDate(String key)
Calendar value for keykey - field_uid as key.Date
Calendar value = group.getDate("key");
public Asset getAsset(String key)
key - field_uid as key.
Asset asset = group.getAsset("key");
public List<Asset> getAssets(String key)
key - field_uid as key.
List<Asset> asset = group.getAssets("key"); Asset
public Group getGroup(String key)
key - field_uid as key.
Group innerGroup = group.getGroup("key");public List<Group> getGroups(String key)
Note :- This will work when group is multiple true.
key - field_uid as key.
Group innerGroup = group.getGroups("key");Group
Copyright © 2021 Contentstack.. All rights reserved.