Changeset 6615 in josm for trunk/src/org/json/JSONArray.java


Ignore:
Timestamp:
2014-01-03T19:32:18+01:00 (12 years ago)
Author:
Don-vip
Message:

fix compilation warnings + minor code refactorization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/org/json/JSONArray.java

    r6484 r6615  
    8383     * The arrayList where the JSONArray's properties are kept.
    8484     */
    85     private final ArrayList myArrayList;
     85    private final ArrayList<Object> myArrayList;
    8686
    8787    /**
     
    8989     */
    9090    public JSONArray() {
    91         this.myArrayList = new ArrayList();
     91        this.myArrayList = new ArrayList<Object>();
    9292    }
    9393
     
    151151     *            A Collection.
    152152     */
    153     public JSONArray(Collection collection) {
    154         this.myArrayList = new ArrayList();
     153    public JSONArray(Collection<?> collection) {
     154        this.myArrayList = new ArrayList<Object>();
    155155        if (collection != null) {
    156             Iterator iter = collection.iterator();
     156            Iterator<?> iter = collection.iterator();
    157157            while (iter.hasNext()) {
    158158                this.myArrayList.add(JSONObject.wrap(iter.next()));
     
    594594     * @return this.
    595595     */
    596     public JSONArray put(Collection value) {
     596    public JSONArray put(Collection<?> value) {
    597597        this.put(new JSONArray(value));
    598598        return this;
     
    647647     * @return this.
    648648     */
    649     public JSONArray put(Map value) {
     649    public JSONArray put(Map<?, ?> value) {
    650650        this.put(new JSONObject(value));
    651651        return this;
     
    696696     *             If the index is negative or if the value is not finite.
    697697     */
    698     public JSONArray put(int index, Collection value) throws JSONException {
     698    public JSONArray put(int index, Collection<?> value) throws JSONException {
    699699        this.put(index, new JSONArray(value));
    700700        return this;
     
    768768     *             number.
    769769     */
    770     public JSONArray put(int index, Map value) throws JSONException {
     770    public JSONArray put(int index, Map<?, ?> value) throws JSONException {
    771771        this.put(index, new JSONObject(value));
    772772        return this;
Note: See TracChangeset for help on using the changeset viewer.