Package com.alibaba.fastjson
Class JSONArray
- java.lang.Object
-
- com.alibaba.fastjson.JSON
-
- com.alibaba.fastjson.JSONArray
-
- All Implemented Interfaces:
JSONAware,JSONStreamAware,Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess
public class JSONArray extends JSON implements List<Object>, Cloneable, RandomAccess, Serializable
- Author:
- wenshao[szujobs@hotmail.com]
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class com.alibaba.fastjson.JSON
DEFAULT_GENERATE_FEATURE, DEFAULT_PARSER_FEATURE, DEFAULT_TYPE_KEY, defaultLocale, defaultTimeZone, DEFFAULT_DATE_FORMAT, VERSION
-
-
Method Summary
-
Methods inherited from class com.alibaba.fastjson.JSON
addMixInAnnotations, clearMixInAnnotations, getMixInAnnotations, handleResovleTask, isValid, isValidArray, isValidObject, parse, parse, parse, parse, parse, parse, parse, parse, parse, parseArray, parseArray, parseArray, parseArray, parseArray, parseArray, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, removeMixInAnnotations, setDefaultTypeKey, toJavaObject, toJavaObject, toJavaObject, toJavaObject, toJSON, toJSON, toJSON, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytes, toJSONBytesWithFastJsonConfig, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONStringWithDateFormat, toJSONStringZ, toString, toString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONString, writeJSONStringTo, writeJSONStringWithFastJsonConfig
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
-
Methods inherited from interface java.util.List
replaceAll, sort, spliterator
-
-
-
-
Method Detail
-
getRelatedArray
public Object getRelatedArray()
- Returns:
- Since:
- 1.1.16
-
setRelatedArray
public void setRelatedArray(Object relatedArray)
-
getComponentType
public Type getComponentType()
-
setComponentType
public void setComponentType(Type componentType)
-
size
public int size()
-
isEmpty
public boolean isEmpty()
-
contains
public boolean contains(Object o)
-
toArray
public Object[] toArray()
-
toArray
public <T> T[] toArray(T[] a)
-
add
public boolean add(Object e)
-
remove
public boolean remove(Object o)
-
containsAll
public boolean containsAll(Collection<?> c)
- Specified by:
containsAllin interfaceCollection<Object>- Specified by:
containsAllin interfaceList<Object>
-
addAll
public boolean addAll(Collection<?> c)
-
fluentAddAll
public JSONArray fluentAddAll(Collection<?> c)
-
addAll
public boolean addAll(int index, Collection<?> c)
-
fluentAddAll
public JSONArray fluentAddAll(int index, Collection<?> c)
-
removeAll
public boolean removeAll(Collection<?> c)
-
fluentRemoveAll
public JSONArray fluentRemoveAll(Collection<?> c)
-
retainAll
public boolean retainAll(Collection<?> c)
-
fluentRetainAll
public JSONArray fluentRetainAll(Collection<?> c)
-
clear
public void clear()
-
fluentClear
public JSONArray fluentClear()
-
fluentRemove
public JSONArray fluentRemove(int index)
-
lastIndexOf
public int lastIndexOf(Object o)
- Specified by:
lastIndexOfin interfaceList<Object>
-
listIterator
public ListIterator<Object> listIterator()
- Specified by:
listIteratorin interfaceList<Object>
-
listIterator
public ListIterator<Object> listIterator(int index)
- Specified by:
listIteratorin interfaceList<Object>
-
getJSONObject
public JSONObject getJSONObject(int index)
-
getJSONArray
public JSONArray getJSONArray(int index)
-
getObject
public <T> T getObject(int index, Class<T> clazz)
-
getObject
public <T> T getObject(int index, Type type)
-
getBoolean
public Boolean getBoolean(int index)
-
getBooleanValue
public boolean getBooleanValue(int index)
-
getByte
public Byte getByte(int index)
-
getByteValue
public byte getByteValue(int index)
-
getShort
public Short getShort(int index)
-
getShortValue
public short getShortValue(int index)
-
getInteger
public Integer getInteger(int index)
-
getIntValue
public int getIntValue(int index)
-
getLong
public Long getLong(int index)
-
getLongValue
public long getLongValue(int index)
-
getFloat
public Float getFloat(int index)
-
getFloatValue
public float getFloatValue(int index)
-
getDouble
public Double getDouble(int index)
-
getDoubleValue
public double getDoubleValue(int index)
-
getBigDecimal
public BigDecimal getBigDecimal(int index)
-
getBigInteger
public BigInteger getBigInteger(int index)
-
getString
public String getString(int index)
-
getDate
public Date getDate(int index)
-
getSqlDate
public Object getSqlDate(int index)
-
getTimestamp
public Object getTimestamp(int index)
-
clone
public Object clone()
-
equals
public boolean equals(Object obj)
-
-