List of usage examples for javax.json JsonArray containsAll
boolean containsAll(Collection<?> c);
From source file:joachimeichborn.geotag.geocode.GoogleGeocoder.java
private String getMatchingContent(final String aAttribute, final JsonArray aResults, final LocationType... aLocationTypes) { for (final LocationType locationType : aLocationTypes) { for (final JsonObject component : aResults.getValuesAs(JsonObject.class)) { final JsonArray types = component.getJsonArray(TYPES_KEY); if (types.containsAll(locationType.getIdentifiers()) && component.containsKey(aAttribute)) { return component.getString(aAttribute); }//from w w w . j ava 2 s . c o m } } return null; }