/** * Add all attribute entries of the given {@link Technique} to the given * {@link TechniqueModel} * * @param technique The {@link Technique} * @param techniqueModel The {@link TechniqueModel} */ private static void addAttributes(Technique technique, DefaultTechniqueModel techniqueModel) { Map<String, String> attributes = Optionals.of(technique.getAttributes()); for (Entry<String, String> entry : attributes.entrySet()) { String attributeName = entry.getKey(); String parameterName = entry.getValue(); techniqueModel.addAttribute(attributeName, parameterName); } }
/** * Add all attribute entries of the given {@link Technique} to the given * {@link TechniqueModel} * * @param technique The {@link Technique} * @param techniqueModel The {@link TechniqueModel} */ private static void addAttributes(Technique technique, DefaultTechniqueModel techniqueModel) { Map<String, String> attributes = Optionals.of(technique.getAttributes()); for (Entry<String, String> entry : attributes.entrySet()) { String attributeName = entry.getKey(); String parameterName = entry.getValue(); techniqueModel.addAttribute(attributeName, parameterName); } }
.ofNullable(technique.getAttributes()) .orElse(Collections.emptyMap()); for (String attributeName : attributes.keySet())
.ofNullable(technique.getAttributes()) .orElse(Collections.emptyMap()); for (String attributeName : attributes.keySet())