com.alibaba.fastjson
类 JSONArray

java.lang.Object
  继承者 com.alibaba.fastjson.JSON
      继承者 com.alibaba.fastjson.JSONArray
所有已实现的接口:
JSONAware, JSONStreamAware, Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess

public class JSONArray
extends JSON
implements List<Object>, JSONAware, Cloneable, RandomAccess, Serializable

作者:
wenshao
另请参见:
序列化表格

字段摘要
 
从类 com.alibaba.fastjson.JSON 继承的字段
DEFAULT_GENERATE_FEATURE, DEFAULT_PARSER_FEATURE, DEFAULT_TYPE_KEY, DEFFAULT_DATE_FORMAT, VERSION
 
构造方法摘要
JSONArray()
           
JSONArray(int initialCapacity)
           
JSONArray(List<Object> list)
           
 
方法摘要
 void add(int index, Object element)
           
 boolean add(Object e)
           
 boolean addAll(Collection<? extends Object> c)
           
 boolean addAll(int index, Collection<? extends Object> c)
           
 void clear()
           
 Object clone()
           
 boolean contains(Object o)
           
 boolean containsAll(Collection<?> c)
           
 boolean equals(Object obj)
           
 Object get(int index)
           
 BigDecimal getBigDecimal(int index)
           
 BigInteger getBigInteger(int index)
           
 Boolean getBoolean(int index)
           
 boolean getBooleanValue(int index)
           
 Byte getByte(int index)
           
 byte getByteValue(int index)
           
 Type getComponentType()
           
 Date getDate(int index)
           
 Double getDouble(int index)
           
 double getDoubleValue(int index)
           
 Float getFloat(int index)
           
 float getFloatValue(int index)
           
 Integer getInteger(int index)
           
 int getIntValue(int index)
           
 JSONArray getJSONArray(int index)
           
 JSONObject getJSONObject(int index)
           
 Long getLong(int index)
           
 long getLongValue(int index)
           
<T> T
getObject(int index, Class<T> clazz)
           
 Object getRelatedArray()
           
 Short getShort(int index)
           
 short getShortValue(int index)
           
 Date getSqlDate(int index)
           
 String getString(int index)
           
 Timestamp getTimestamp(int index)
           
 int hashCode()
           
 int indexOf(Object o)
           
 boolean isEmpty()
           
 Iterator<Object> iterator()
           
 int lastIndexOf(Object o)
           
 ListIterator<Object> listIterator()
           
 ListIterator<Object> listIterator(int index)
           
 Object remove(int index)
           
 boolean remove(Object o)
           
 boolean removeAll(Collection<?> c)
           
 boolean retainAll(Collection<?> c)
           
 Object set(int index, Object element)
           
 void setComponentType(Type componentType)
           
 void setRelatedArray(Object relatedArray)
           
 int size()
           
 List<Object> subList(int fromIndex, int toIndex)
           
 Object[] toArray()
           
<T> T[]
toArray(T[] a)
           
 
从类 com.alibaba.fastjson.JSON 继承的方法
handleResovleTask, parse, parse, parse, parse, parse, parse, parseArray, parseArray, parseArray, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, parseObject, toJavaObject, toJSON, toJSON, toJSONBytes, toJSONBytes, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONString, toJSONStringWithDateFormat, toJSONStringZ, toString, writeJSONString, writeJSONStringTo
 
从类 java.lang.Object 继承的方法
getClass, notify, notifyAll, wait, wait, wait
 
从接口 com.alibaba.fastjson.JSONAware 继承的方法
toJSONString
 

构造方法详细信息

JSONArray

public JSONArray()

JSONArray

public JSONArray(List<Object> list)

JSONArray

public JSONArray(int initialCapacity)
方法详细信息

getRelatedArray

public Object getRelatedArray()
返回:
从以下版本开始:
1.1.16

setRelatedArray

public void setRelatedArray(Object relatedArray)

getComponentType

public Type getComponentType()

setComponentType

public void setComponentType(Type componentType)

size

public int size()
指定者:
接口 Collection<Object> 中的 size
指定者:
接口 List<Object> 中的 size

isEmpty

public boolean isEmpty()
指定者:
接口 Collection<Object> 中的 isEmpty
指定者:
接口 List<Object> 中的 isEmpty

contains

public boolean contains(Object o)
指定者:
接口 Collection<Object> 中的 contains
指定者:
接口 List<Object> 中的 contains

iterator

public Iterator<Object> iterator()
指定者:
接口 Iterable<Object> 中的 iterator
指定者:
接口 Collection<Object> 中的 iterator
指定者:
接口 List<Object> 中的 iterator

toArray

public Object[] toArray()
指定者:
接口 Collection<Object> 中的 toArray
指定者:
接口 List<Object> 中的 toArray

toArray

public <T> T[] toArray(T[] a)
指定者:
接口 Collection<Object> 中的 toArray
指定者:
接口 List<Object> 中的 toArray

add

public boolean add(Object e)
指定者:
接口 Collection<Object> 中的 add
指定者:
接口 List<Object> 中的 add

remove

public boolean remove(Object o)
指定者:
接口 Collection<Object> 中的 remove
指定者:
接口 List<Object> 中的 remove

containsAll

public boolean containsAll(Collection<?> c)
指定者:
接口 Collection<Object> 中的 containsAll
指定者:
接口 List<Object> 中的 containsAll

addAll

public boolean addAll(Collection<? extends Object> c)
指定者:
接口 Collection<Object> 中的 addAll
指定者:
接口 List<Object> 中的 addAll

addAll

public boolean addAll(int index,
                      Collection<? extends Object> c)
指定者:
接口 List<Object> 中的 addAll

removeAll

public boolean removeAll(Collection<?> c)
指定者:
接口 Collection<Object> 中的 removeAll
指定者:
接口 List<Object> 中的 removeAll

retainAll

public boolean retainAll(Collection<?> c)
指定者:
接口 Collection<Object> 中的 retainAll
指定者:
接口 List<Object> 中的 retainAll

clear

public void clear()
指定者:
接口 Collection<Object> 中的 clear
指定者:
接口 List<Object> 中的 clear

set

public Object set(int index,
                  Object element)
指定者:
接口 List<Object> 中的 set

add

public void add(int index,
                Object element)
指定者:
接口 List<Object> 中的 add

remove

public Object remove(int index)
指定者:
接口 List<Object> 中的 remove

indexOf

public int indexOf(Object o)
指定者:
接口 List<Object> 中的 indexOf

lastIndexOf

public int lastIndexOf(Object o)
指定者:
接口 List<Object> 中的 lastIndexOf

listIterator

public ListIterator<Object> listIterator()
指定者:
接口 List<Object> 中的 listIterator

listIterator

public ListIterator<Object> listIterator(int index)
指定者:
接口 List<Object> 中的 listIterator

subList

public List<Object> subList(int fromIndex,
                            int toIndex)
指定者:
接口 List<Object> 中的 subList

get

public Object get(int index)
指定者:
接口 List<Object> 中的 get

getJSONObject

public JSONObject getJSONObject(int index)

getJSONArray

public JSONArray getJSONArray(int index)

getObject

public <T> T getObject(int index,
                       Class<T> clazz)

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 Date getSqlDate(int index)

getTimestamp

public Timestamp getTimestamp(int index)

clone

public Object clone()
覆盖:
Object 中的 clone

equals

public boolean equals(Object obj)
指定者:
接口 Collection<Object> 中的 equals
指定者:
接口 List<Object> 中的 equals
覆盖:
Object 中的 equals

hashCode

public int hashCode()
指定者:
接口 Collection<Object> 中的 hashCode
指定者:
接口 List<Object> 中的 hashCode
覆盖:
Object 中的 hashCode


Copyright © 2012-2014 Alibaba Group. All Rights Reserved.