List<JsonPropertyAdapter> () { Collection<YAMLKeyValue> keyValues = myObject.getKeyValues(); List<JsonPropertyAdapter> adapters = new ArrayList<>(keyValues.size()); for (YAMLKeyValue value : keyValues) { if (addPropertiesFromReferencedObject(adapters, value)) continue; adapters.add(new YamlPropertyAdapter(value)); } return adapters; }