@Override public Collection<JsonValue> values() { return json.values(); }
@Override public Collection<JsonValue> values() { return json.values(); }
@Override public final Collection<JsonValue> values() { return this.resource.values(); }
@Override public Stream<JsonValue> getValueStream() { //X TODO this implementation is very simplistic //X I find it unintuitive what the spec intends here //X we probably need to improve this Event current = current(); if (current == Event.START_ARRAY) { return getArrayStream(); } if (current == Event.START_OBJECT) { return getObject().values().stream(); } throw new IllegalStateException(current + " doesn't support getValueStream"); } }
@Override public Stream<JsonValue> getValueStream() { //X TODO this implementation is very simplistic //X I find it unintuitive what the spec intends here //X we probably need to improve this Event current = current(); if (current == Event.START_ARRAY) { return getArrayStream(); } if (current == Event.START_OBJECT) { return getObject().values().stream(); } throw new IllegalStateException(current + " doesn't support getValueStream"); } }
/** * Get a list of all file names in the gist. * @return File names * @throws IOException If there is any I/O problem */ public Iterable<String> files() throws IOException { final JsonObject array = this.gist.json().getJsonObject("files"); final Collection<String> files = new ArrayList<String>(array.size()); for (final JsonValue value : array.values()) { files.add(JsonObject.class.cast(value).getString("filename")); } return files; } @Override
ArrayList<Attribute> attributesList = new ArrayList<>(jsonObject.values().size());
ArrayList<Attribute> attributesList = new ArrayList<>(jsonObject.values().size());