java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList
org.jfree.data.json.impl.JSONArray
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable
,Collection
,List
,RandomAccess
,JSONAware
,JSONStreamAware
A JSON array.
This class is for internal use by JFreeChart, it is not part of the supported API and you should not call it directly. If you need JSON support in your project you should include JSON.simple (https://code.google.com/p/json-simple/) or some other JSON library directly in your project.
This class is for internal use by JFreeChart, it is not part of the supported API and you should not call it directly. If you need JSON support in your project you should include JSON.simple (https://code.google.com/p/json-simple/) or some other JSON library directly in your project.
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a JSON string representation of this list.static String
toJSONString
(List list) Convert a list to JSON text.toString()
Returns a string representation of this list.void
writeJSONString
(Writer out) Writes this array to the specified output writer.static void
writeJSONString
(List list, Writer out) Encode a list into JSON text and write it to out.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
JSONArray
public JSONArray()
-
-
Method Details
-
writeJSONString
Encode a list into JSON text and write it to out. If this list is also aJSONStreamAware
or aJSONAware
,JSONStreamAware
andJSONAware
specific behaviours will be ignored at this top level.- Parameters:
list
- the list (null
permitted).out
- the output writer (null
not permitted).- Throws:
IOException
- if there is an I/O problem.- See Also:
-
writeJSONString
Writes this array to the specified output writer.- Specified by:
writeJSONString
in interfaceJSONStreamAware
- Parameters:
out
- the output writer (null
not permitted).- Throws:
IOException
- if there is an I/O problem.
-
toJSONString
Convert a list to JSON text. The result is a JSON array. If this list is also aJSONAware
,JSONAware
specific behaviours will be omitted at this top level.- Parameters:
list
- the list (null
permitted).- Returns:
- JSON text, or "null" if list is null.
- See Also:
-
toJSONString
Returns a JSON string representation of this list.- Specified by:
toJSONString
in interfaceJSONAware
- Returns:
- A string.
-
toString
Returns a string representation of this list.- Overrides:
toString
in classAbstractCollection
- Returns:
- A string.
-