Package com.liferay.portal.json
Class JSONArrayImpl
Object
com.liferay.portal.json.JSONArrayImpl
- All Implemented Interfaces:
com.liferay.portal.kernel.json.JSONArray
,com.liferay.portal.kernel.json.JSONSerializable
,Externalizable
,Serializable
,Iterable
- Author:
- Brian Wing Shun Chan
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionJSONArrayImpl
(String json) JSONArrayImpl
(Collection<?> collection) JSONArrayImpl
(org.json.JSONArray jsonArray) -
Method Summary
Modifier and TypeMethodDescriptionget
(int index) boolean
getBoolean
(int index) double
getDouble
(int index) int
getInt
(int index) org.json.JSONArray
com.liferay.portal.kernel.json.JSONArray
getJSONArray
(int index) com.liferay.portal.kernel.json.JSONObject
getJSONObject
(int index) long
getLong
(int index) getString
(int index) boolean
isNull
(int index) iterator()
int
length()
com.liferay.portal.kernel.json.JSONArray
put
(boolean value) com.liferay.portal.kernel.json.JSONArray
put
(double value) com.liferay.portal.kernel.json.JSONArray
put
(int value) com.liferay.portal.kernel.json.JSONArray
put
(long value) com.liferay.portal.kernel.json.JSONArray
com.liferay.portal.kernel.json.JSONArray
put
(com.liferay.portal.kernel.json.JSONArray jsonArray) com.liferay.portal.kernel.json.JSONArray
put
(com.liferay.portal.kernel.json.JSONObject jsonObject) com.liferay.portal.kernel.json.JSONArray
com.liferay.portal.kernel.json.JSONArray
void
readExternal
(ObjectInput objectInput) toString()
toString
(int indentFactor) void
writeExternal
(ObjectOutput objectOutput) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
JSONArrayImpl
public JSONArrayImpl() -
JSONArrayImpl
-
JSONArrayImpl
public JSONArrayImpl(org.json.JSONArray jsonArray) -
JSONArrayImpl
- Throws:
com.liferay.portal.kernel.json.JSONException
-
-
Method Details
-
get
- Specified by:
get
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getBoolean
public boolean getBoolean(int index) - Specified by:
getBoolean
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getDouble
public double getDouble(int index) - Specified by:
getDouble
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getInt
public int getInt(int index) - Specified by:
getInt
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getJSONArray
public org.json.JSONArray getJSONArray() -
getJSONArray
public com.liferay.portal.kernel.json.JSONArray getJSONArray(int index) - Specified by:
getJSONArray
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getJSONObject
public com.liferay.portal.kernel.json.JSONObject getJSONObject(int index) - Specified by:
getJSONObject
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getLong
public long getLong(int index) - Specified by:
getLong
in interfacecom.liferay.portal.kernel.json.JSONArray
-
getString
- Specified by:
getString
in interfacecom.liferay.portal.kernel.json.JSONArray
-
isNull
public boolean isNull(int index) - Specified by:
isNull
in interfacecom.liferay.portal.kernel.json.JSONArray
-
iterator
-
join
- Specified by:
join
in interfacecom.liferay.portal.kernel.json.JSONArray
- Throws:
com.liferay.portal.kernel.json.JSONException
-
length
public int length()- Specified by:
length
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(boolean value) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(double value) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(int value) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(com.liferay.portal.kernel.json.JSONArray jsonArray) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(com.liferay.portal.kernel.json.JSONObject jsonObject) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(long value) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
- Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
put
public com.liferay.portal.kernel.json.JSONArray put(com.liferay.petra.function.UnsafeSupplier<Object, Exception> valueUnsafeSupplier) - Specified by:
put
in interfacecom.liferay.portal.kernel.json.JSONArray
-
readExternal
- Specified by:
readExternal
in interfaceExternalizable
- Throws:
IOException
-
toJSONString
- Specified by:
toJSONString
in interfacecom.liferay.portal.kernel.json.JSONSerializable
-
toString
-
toString
- Specified by:
toString
in interfacecom.liferay.portal.kernel.json.JSONArray
- Throws:
com.liferay.portal.kernel.json.JSONException
-
write
- Specified by:
write
in interfacecom.liferay.portal.kernel.json.JSONArray
- Throws:
com.liferay.portal.kernel.json.JSONException
-
writeExternal
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-