亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? jsonarray.java

?? AJAX基礎編程--源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
     * @return      The truth.     */    public boolean optBoolean(int index, boolean defaultValue)  {        Object o = opt(index);        if (o != null) {            if (o == Boolean.FALSE || 					(o instanceof String && 					((String)o).equalsIgnoreCase("false"))) {                return false;            } else if (o == Boolean.TRUE || 					(o instanceof String && 					((String)o).equalsIgnoreCase("true"))) {                return true;            }        }        return defaultValue;    }    /**     * Get the optional double value associated with an index.     * NaN is returned if the index is not found,     * or if the value is not a number and cannot be converted to a number.     *     * @param index The index must be between 0 and length() - 1.     * @return      The value.     */    public double optDouble(int index) {        return optDouble(index, Double.NaN);    }    /**     * Get the optional double value associated with an index.     * The defaultValue is returned if the index is not found,     * or if the value is not a number and cannot be converted to a number.     *     * @param index subscript     * @param defaultValue     The default value.     * @return      The value.     */    public double optDouble(int index, double defaultValue) {        Object o = opt(index);        if (o != null) {            if (o instanceof Number) {                return ((Number) o).doubleValue();            }            try {                return new Double((String)o).doubleValue();            }            catch (Exception e) {            }        }        return defaultValue;    }    /**     * Get the optional int value associated with an index.     * Zero is returned if the index is not found,     * or if the value is not a number and cannot be converted to a number.     *     * @param index The index must be between 0 and length() - 1.     * @return      The value.     */    public int optInt(int index) {        return optInt(index, 0);    }    /**     * Get the optional int value associated with an index.     * The defaultValue is returned if the index is not found,     * or if the value is not a number and cannot be converted to a number.     * @param index The index must be between 0 and length() - 1.     * @param defaultValue     The default value.     * @return      The value.     */    public int optInt(int index, int defaultValue) {        Object o = opt(index);        if (o != null) {            if (o instanceof Number) {                return ((Number)o).intValue();            }            try {                return Integer.parseInt((String)o);            }            catch (Exception e) {            }        }        return defaultValue;    }    /**     * Get the optional JSONArray associated with an index.     * @param index subscript     * @return      A JSONArray value, or null if the index has no value,     * or if the value is not a JSONArray.     */    public JSONArray optJSONArray(int index) {        Object o = opt(index);        if (o instanceof JSONArray) {            return (JSONArray)o;        }        return null;    }    /**     * Get the optional JSONObject associated with an index.     * Null is returned if the key is not found, or null if the index has     * no value, or if the value is not a JSONObject.     *     * @param index The index must be between 0 and length() - 1.     * @return      A JSONObject value.     */    public JSONObject optJSONObject(int index) {        Object o = opt(index);        if (o instanceof JSONObject) {            return (JSONObject)o;        }        return null;    }    /**     * Get the optional string value associated with an index. It returns an     * empty string if there is no value at that index. If the value     * is not a string and is not null, then it is coverted to a string.     *     * @param index The index must be between 0 and length() - 1.     * @return      A String value.     */    public String optString(int index){        return optString(index, "");    }    /**     * Get the optional string associated with an index.     * The defaultValue is returned if the key is not found.     *     * @param index The index must be between 0 and length() - 1.     * @param defaultValue     The default value.     * @return      A String value.     */    public String optString(int index, String defaultValue){        Object o = opt(index);        if (o != null) {            return o.toString();        }        return defaultValue;    }    /**     * Append a boolean value.     *     * @param value A boolean value.     * @return this.     */    public JSONArray put(boolean value) {        put(new Boolean(value));        return this;    }    /**     * Append a double value.     *     * @param value A double value.     * @return this.     */    public JSONArray put(double value) {        put(new Double(value));        return this;    }    /**     * Append an int value.     *     * @param value An int value.     * @return this.     */    public JSONArray put(int value) {        put(new Integer(value));        return this;    }    /**     * Append an object value.     * @param value An object value.  The value should be a     *  Boolean, Double, Integer, JSONArray, JSObject, or String, or the     *  JSONObject.NULL object.     * @return this.     */    public JSONArray put(Object value) {        myArrayList.add(value);        return this;    }    /**     * Put or replace a boolean value in the JSONArray.     * @exception NoSuchElementException The index must not be negative.     * @param index subscript The subscript. If the index is greater than the length of     *  the JSONArray, then null elements will be added as necessary to pad     *  it out.     * @param value A boolean value.     * @return this.     */    public JSONArray put(int index, boolean value) {        put(index, new Boolean(value));        return this;    }    /**     * Put or replace a double value.     * @exception NoSuchElementException The index must not be negative.     * @param index subscript The subscript. If the index is greater than the length of     *  the JSONArray, then null elements will be added as necessary to pad     *  it out.     * @param value A double value.     * return this.     */    public JSONArray put(int index, double value) {        put(index, new Double(value));        return this;    }    /**     * Put or replace an int value.     * @exception NoSuchElementException The index must not be negative.     * @param index subscript The subscript. If the index is greater than the length of     *  the JSONArray, then null elements will be added as necessary to pad     *  it out.     * @param value An int value.     * @return this.     */    public JSONArray put(int index, int value) {        put(index, new Integer(value));        return this;    }    /**     * Put or replace an object value in the JSONArray.     * @exception NoSuchElementException The index must not be negative.     * @param index The subscript. If the index is greater than the length of     *  the JSONArray, then null elements will be added as necessary to pad     *  it out.     * @param value An object value.     * return this.     */    public JSONArray put(int index, Object value)            throws NoSuchElementException, NullPointerException {        if (index < 0) {            throw new NoSuchElementException("JSONArray[" + index +                "] not found.");        } else if (value == null) {            throw new NullPointerException();        } else if (index < length()) {            myArrayList.set(index, value);        } else {            while (index != length()) {                put(null);            }            put(value);        }        return this;    }    /**     * Produce a JSONObject by combining a JSONArray of names with the values     * of this JSONArray.     * @param names A JSONArray containing a list of key strings. These will be     * paired with the values.     * @return A JSONObject, or null if there are no names or if this JSONArray     * has no values.     */    public JSONObject toJSONObject(JSONArray names) {        if (names == null || names.length() == 0 || length() == 0) {            return null;        }        JSONObject jo = new JSONObject();        for (int i = 0; i < names.length(); i += 1) {            jo.put(names.getString(i), this.opt(i));        }        return jo;    }    /**     * Make an JSON external form string of this JSONArray. For compactness, no     * unnecessary whitespace is added.     * Warning: This method assumes that the data structure is acyclical.     *     * @return a printable, displayable, transmittable     *  representation of the array.     */    public String toString() {        return '[' + join(",") + ']';    }    /**     * Make a prettyprinted JSON string of this JSONArray.     * Warning: This method assumes that the data structure is non-cyclical.     * @param indentFactor The number of spaces to add to each level of     *  indentation.     * @return a printable, displayable, transmittable     *  representation of the object, beginning      *  with <code>[</code>&nbsp;<small>(left bracket)</small> and ending      *  with <code>]</code>&nbsp;<small>(right bracket)</small>.     */    public String toString(int indentFactor) {        return toString(indentFactor, 0);    }    /**     * Make a prettyprinted string of this JSONArray.     * Warning: This method assumes that the data structure is non-cyclical.     * @param indentFactor The number of spaces to add to each level of     *  indentation.     * @param indent The indention of the top level.     * @return a printable, displayable, transmittable     *  representation of the array.     */    String toString(int indentFactor, int indent) {        int i;        Object o;        String pad = "";        StringBuffer sb = new StringBuffer();        int newindent = indent + indentFactor;		int len = myArrayList.size();		if (len == 0) {			return "[]";		}        for (i = 0; i < newindent; i += 1) {            pad += ' ';        }        sb.append("[\n");        for (i = 0; i < len; i += 1) {            if (i > 0) {                sb.append(",\n");            }            sb.append(pad);            o = myArrayList.get(i);            if (o == null) {                sb.append("null");            } else if (o instanceof String) {                sb.append(JSONObject.quote((String) o));            } else if (o instanceof Number) {                sb.append(JSONObject.numberToString((Number) o));            } else if (o instanceof JSONObject) {                sb.append(((JSONObject)o).toString(indentFactor, newindent));            } else if (o instanceof JSONArray) {                sb.append(((JSONArray)o).toString(indentFactor, newindent));            } else {                sb.append(o.toString());            }        }		sb.append('\n');        for (i = 0; i < indent; i += 1) {			sb.append(' ');        }        sb.append(']');        return sb.toString();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级片在线观看| 亚洲一区二区三区小说| 亚洲欧美一区二区三区孕妇| 亚洲午夜羞羞片| 国产ts人妖一区二区| 欧美日韩国产高清一区二区三区 | 麻豆久久久久久| av在线综合网| 日韩欧美成人激情| 夜夜嗨av一区二区三区网页| 国产精品99久| 精品国产免费人成电影在线观看四季| 亚洲国产三级在线| av综合在线播放| 久久久久99精品一区| 天天做天天摸天天爽国产一区| 福利电影一区二区三区| 久久这里只精品最新地址| 日韩电影一区二区三区四区| 在线观看91精品国产入口| 久久奇米777| 久久99久久99精品免视看婷婷 | 精品国免费一区二区三区| 亚洲不卡一区二区三区| 91蜜桃网址入口| 国产精品国产三级国产aⅴ入口| 国产露脸91国语对白| 日韩精品中文字幕在线一区| 日韩在线观看一区二区| 欧美精品日韩综合在线| 日韩国产成人精品| 日韩欧美美女一区二区三区| 日本特黄久久久高潮| 欧美一区二区二区| 麻豆精品久久精品色综合| 制服丝袜在线91| 久久激情五月婷婷| 久久久影视传媒| 国产91精品免费| ...xxx性欧美| 欧美性高清videossexo| 亚洲影视资源网| 欧美一区国产二区| 国模冰冰炮一区二区| 国产亚洲欧美色| www.av精品| 亚洲aⅴ怡春院| 精品国产sm最大网站免费看| 国产麻豆午夜三级精品| 中文字幕一区av| 精品视频免费在线| 久久福利资源站| 国产精品二三区| 欧美无乱码久久久免费午夜一区| 亚洲va国产va欧美va观看| 日韩一区二区三区电影| 国产精品综合av一区二区国产馆| 国产精品乱码久久久久久| 欧美日韩中文一区| 国产一区欧美日韩| 亚洲欧洲99久久| 制服丝袜中文字幕亚洲| 国产精品亚洲午夜一区二区三区| 亚洲欧洲av一区二区三区久久| 在线视频综合导航| 久久国产免费看| 亚洲日本乱码在线观看| 日韩一区国产二区欧美三区| av日韩在线网站| 日韩综合小视频| 中文无字幕一区二区三区| 欧洲一区二区三区在线| 久久99精品久久久久久久久久久久 | 成人免费看视频| 婷婷综合久久一区二区三区| 国产欧美视频在线观看| 欧美日韩国产小视频| 成人午夜激情在线| 毛片一区二区三区| 亚洲电影一区二区三区| 久久久久久夜精品精品免费| 337p亚洲精品色噜噜狠狠| 97精品电影院| 高清在线不卡av| 久久电影国产免费久久电影 | 91影院在线观看| 精油按摩中文字幕久久| 亚洲第四色夜色| 亚洲黄色av一区| 中文字幕精品在线不卡| 精品国产91乱码一区二区三区| 欧美三级电影在线看| 97精品久久久午夜一区二区三区| 国产一区二区女| 久久99在线观看| 丝袜美腿成人在线| 亚洲第一av色| 一区二区三区欧美在线观看| 中文字幕一区二区视频| 国产欧美一区二区精品性色超碰 | 91精品国产一区二区| 色综合天天视频在线观看| 成人黄色电影在线| 国模套图日韩精品一区二区 | 久久看人人爽人人| 精品久久人人做人人爽| 欧美一个色资源| 欧美一区二区三区人| 欧美日韩国产欧美日美国产精品| 在线亚洲+欧美+日本专区| 91黄色免费版| 欧美婷婷六月丁香综合色| 色女孩综合影院| 欧洲精品在线观看| 日本福利一区二区| 欧美丝袜丝nylons| 欧美日韩dvd在线观看| 欧美日韩一区二区在线视频| 欧美日韩一二三| 欧美喷潮久久久xxxxx| 欧美理论片在线| 日韩午夜激情免费电影| 欧美mv日韩mv国产网站| 国产午夜精品一区二区三区视频| 国产亚洲综合色| 国产精品久久久久影视| 亚洲欧美日韩国产综合在线| 亚洲国产日韩在线一区模特| 日韩电影免费一区| 激情图片小说一区| 成人在线视频首页| 色婷婷综合久色| 欧美日韩国产123区| 日韩美女在线视频| 亚洲国产高清不卡| 亚洲伊人伊色伊影伊综合网| 蜜臀久久99精品久久久画质超高清| 久久国产精品72免费观看| 成人自拍视频在线观看| 欧美中文字幕一区| 欧美xxxxx牲另类人与| 欧美国产欧美亚州国产日韩mv天天看完整 | 国产精品热久久久久夜色精品三区| 国产精品人妖ts系列视频| 一区二区三区在线视频免费| 五月天一区二区| 国产成a人亚洲| 欧美日韩高清不卡| 久久精品视频网| 亚洲一区在线观看网站| 国产一区二区看久久| 欧美主播一区二区三区美女| 精品欧美久久久| 一区二区三区**美女毛片| 狠狠网亚洲精品| 在线观看亚洲精品| 久久精品水蜜桃av综合天堂| 一区二区三区美女| 国产一区二区三区不卡在线观看 | 日韩欧美色综合| 伊人色综合久久天天| 国内精品久久久久影院一蜜桃| 99re在线精品| 国产日韩欧美综合在线| 天天影视网天天综合色在线播放| 成人av在线网| 日韩精品中文字幕一区二区三区| 一区二区三区在线高清| 国产白丝网站精品污在线入口| 欧美日韩国产一区二区三区地区| 国产精品青草久久| 毛片不卡一区二区| 欧美精品v国产精品v日韩精品 | 国产尤物一区二区在线| 欧美三级午夜理伦三级中视频| 久久精品日产第一区二区三区高清版 | 欧美人牲a欧美精品| 一区免费观看视频| 国产·精品毛片| 精品国产乱码久久久久久牛牛 | 亚洲精品视频在线观看免费| 国产成人精品1024| ww亚洲ww在线观看国产| 麻豆精品蜜桃视频网站| 欧美一区三区四区| 亚洲国产精品久久一线不卡| 91麻豆福利精品推荐| 国产精品久久久久久久久久久免费看 | 国产精品一区二区在线播放| 日韩精品在线看片z| 婷婷国产v国产偷v亚洲高清| 欧美最新大片在线看| 亚洲欧美电影院| 在线观看国产91| 一区二区三区成人| 色94色欧美sute亚洲线路一ni| 亚洲色图清纯唯美| 99久久99久久久精品齐齐| 国产精品久久久久7777按摩| 国产91综合网|