JSONArray (fastjson 1.1.26 API)

fastjson



com.alibaba.fastjson Class JSONArray

java.lang.Object
  extended by com.alibaba.fastjson.JSON
      extended by 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>, JSONAware, Cloneable, RandomAccess, Serializable

Author:
wenshao
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.alibaba.fastjson.JSON
 
Constructor Summary
 
Method Summary
 void
 boolean
 boolean
 boolean
 void
 Object
 boolean
 boolean
 boolean
 Object
 BigDecimal
 BigInteger
 Boolean
 boolean
 Byte
 byte
 Type
 Date
 Double
 double
 Float
 float
 Integer
 int
 JSONArray
 JSONObject
 Long
 long
<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)
             
Methods inherited from class com.alibaba.fastjson.JSON
 
Methods inherited from class java.lang.Object
 
Methods inherited from interface com.alibaba.fastjson.JSONAware
 

Constructor Detail

JSONArray

public JSONArray()

JSONArray

public JSONArray(List<Object> list)

JSONArray

public JSONArray(int initialCapacity)
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()
Specified by:
size in interface Collection<Object>
Specified by:
size in interface List<Object>

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Collection<Object>
Specified by:
isEmpty in interface List<Object>

contains

public boolean contains(Object o)
Specified by:
contains in interface Collection<Object>
Specified by:
contains in interface List<Object>

iterator

public Iterator<Object> iterator()
Specified by:
iterator in interface Iterable<Object>
Specified by:
iterator in interface Collection<Object>
Specified by:
iterator in interface List<Object>

toArray

public Object[] toArray()
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface List<Object>

toArray

public <T> T[] toArray(T[] a)
Specified by:
toArray in interface Collection<Object>
Specified by:
toArray in interface List<Object>

add

public boolean add(Object e)
Specified by:
add in interface Collection<Object>
Specified by:
add in interface List<Object>

remove

public boolean remove(Object o)
Specified by:
remove in interface Collection<Object>
Specified by:
remove in interface List<Object>

containsAll

public boolean containsAll(Collection<?> c)
Specified by:
containsAll in interface Collection<Object>
Specified by:
containsAll in interface List<Object>

addAll

public boolean addAll(Collection<? extends Object> c)
Specified by:
addAll in interface Collection<Object>
Specified by:
addAll in interface List<Object>

addAll

public boolean addAll(int index,
                      Collection<? extends Object> c)
Specified by:
addAll in interface List<Object>

removeAll

public boolean removeAll(Collection<?> c)
Specified by:
removeAll in interface Collection<Object>
Specified by:
removeAll in interface List<Object>

retainAll

public boolean retainAll(Collection<?> c)
Specified by:
retainAll in interface Collection<Object>
Specified by:
retainAll in interface List<Object>

clear

public void clear()
Specified by:
clear in interface Collection<Object>
Specified by:
clear in interface List<Object>

set

public Object set(int index,
                  Object element)
Specified by:
set in interface List<Object>

add

public void add(int index,
                Object element)
Specified by:
add in interface List<Object>

remove

public Object remove(int index)
Specified by:
remove in interface List<Object>

indexOf

public int indexOf(Object o)
Specified by:
indexOf in interface List<Object>

lastIndexOf

public int lastIndexOf(Object o)
Specified by:
lastIndexOf in interface List<Object>

listIterator

public ListIterator<Object> listIterator()
Specified by:
listIterator in interface List<Object>

listIterator

public ListIterator<Object> listIterator(int index)
Specified by:
listIterator in interface List<Object>

subList

public List<Object> subList(int fromIndex,
                            int toIndex)
Specified by:
subList in interface List<Object>

get

public Object get(int index)
Specified by:
get in interface List<Object>

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()
Overrides:
clone in class Object

equals

public boolean equals(Object obj)
Specified by:
equals in interface Collection<Object>
Specified by:
equals in interface List<Object>
Overrides:
equals in class Object

hashCode

public int hashCode()
Specified by:
hashCode in interface Collection<Object>
Specified by:
hashCode in interface List<Object>
Overrides:
hashCode in class Object


Copyright © 2012 Alibaba Group. All Rights Reserved.