Example usage for com.google.gson JsonArray iterator

List of usage examples for com.google.gson JsonArray iterator

Introduction

In this page you can find the example usage for com.google.gson JsonArray iterator.

Prototype

public Iterator<JsonElement> iterator() 

Source Link

Document

Returns an iterator to navigate the elements of the array.

Usage

From source file:com.google.dart.server.generated.types.MoveFileOptions.java

License:Open Source License

public static List<MoveFileOptions> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }//from  www.ja va 2 s  .c  om
    ArrayList<MoveFileOptions> list = new ArrayList<MoveFileOptions>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.NavigationRegion.java

License:Open Source License

public static List<NavigationRegion> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }/*from w ww . j av a 2s  . c  om*/
    ArrayList<NavigationRegion> list = new ArrayList<NavigationRegion>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.NavigationTarget.java

License:Open Source License

public static List<NavigationTarget> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }// w ww . ja va  2s  .co  m
    ArrayList<NavigationTarget> list = new ArrayList<NavigationTarget>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.Occurrences.java

License:Open Source License

public static List<Occurrences> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }//from  w ww.  j  a v a2  s.  c  om
    ArrayList<Occurrences> list = new ArrayList<Occurrences>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.OverriddenMember.java

License:Open Source License

public static List<OverriddenMember> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }/* ww  w .j  a  v a2s.  c  o  m*/
    ArrayList<OverriddenMember> list = new ArrayList<OverriddenMember>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.OverrideMember.java

License:Open Source License

public static List<OverrideMember> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }//from www .  j  a va 2 s.c  o  m
    ArrayList<OverrideMember> list = new ArrayList<OverrideMember>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.Position.java

License:Open Source License

public static List<Position> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }//from w  w  w  .  j a va2s. c  om
    ArrayList<Position> list = new ArrayList<Position>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.PubStatus.java

License:Open Source License

public static List<PubStatus> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }/* w ww.j av a  2  s  . co m*/
    ArrayList<PubStatus> list = new ArrayList<PubStatus>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.RefactoringMethodParameter.java

License:Open Source License

public static List<RefactoringMethodParameter> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }/*from w w w  .  j av a2 s. c  o  m*/
    ArrayList<RefactoringMethodParameter> list = new ArrayList<RefactoringMethodParameter>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}

From source file:com.google.dart.server.generated.types.RefactoringProblem.java

License:Open Source License

public static List<RefactoringProblem> fromJsonArray(JsonArray jsonArray) {
    if (jsonArray == null) {
        return EMPTY_LIST;
    }//from   www .  j a  va2 s  .  com
    ArrayList<RefactoringProblem> list = new ArrayList<RefactoringProblem>(jsonArray.size());
    Iterator<JsonElement> iterator = jsonArray.iterator();
    while (iterator.hasNext()) {
        list.add(fromJson(iterator.next().getAsJsonObject()));
    }
    return list;
}