001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.portal.kernel.json;
016    
017    import java.io.Writer;
018    
019    /**
020     * @author Brian Wing Shun Chan
021     */
022    public interface JSONArray {
023    
024            public boolean getBoolean(int index);
025    
026            public double getDouble(int index);
027    
028            public int getInt(int index);
029    
030            public JSONArray getJSONArray(int index);
031    
032            public JSONObject getJSONObject(int index);
033    
034            public long getLong(int index);
035    
036            public String getString(int index);
037    
038            public boolean isNull(int index);
039    
040            public String join(String separator) throws JSONException;
041    
042            public int length();
043    
044            public JSONArray put(boolean value);
045    
046            public JSONArray put(double value);
047    
048            public JSONArray put(int value);
049    
050            public JSONArray put(long value);
051    
052            public JSONArray put(JSONArray value);
053    
054            public JSONArray put(JSONObject value);
055    
056            public JSONArray put(String value);
057    
058            public String toString();
059    
060            public String toString(int indentFactor) throws JSONException;
061    
062            public Writer write(Writer writer) throws JSONException;
063    
064    }