@Test public void toArrayOfTagsTest() { final String tags = "key1=value1,key2=value2"; List<Tag> tagsList = toArrayOfTags(tags, DELIMITER); assertEquals("key1", tagsList.get(0).getKey()); assertEquals("value1", tagsList.get(0).getValue()); assertEquals("key2", tagsList.get(1).getKey()); assertEquals("value2", tagsList.get(1).getValue()); }
public static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter) { if (StringUtils.isEmpty(provisioningTags)) { return new ArrayList<>(); } final List<Tag> tags = new ArrayList<>(); for (String line : provisioningTags.split(delimiter)) { final ParametersLine tagLine = new ParametersLine(line); if (tagLine.isValid()) { final Tag tag = new Tag(); tag.setKey(tagLine.getKey()); tag.setValue(tagLine.getValue()); tags.add(tag); } } return tags; }
ServiceCatalogUtil { public static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter) { if (StringUtils.isEmpty(provisioningTags)) { return new ArrayList<>(); } final List<Tag> tags = new ArrayList<>(); for (String line : provisioningTags.split(delimiter)) { final ParametersLine tagLine = new ParametersLine(line); if (tagLine.isValid()) { final Tag tag = new Tag(); tag.setKey(tagLine.getKey()); tag.setValue(tagLine.getValue()); tags.add(tag); } } return tags; } }
ServiceCatalogUtil { public static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter) { if (StringUtils.isEmpty(provisioningTags)) { return new ArrayList<>(); } final List<Tag> tags = new ArrayList<>(); for (String line : provisioningTags.split(delimiter)) { final ParametersLine tagLine = new ParametersLine(line); if (tagLine.isValid()) { final Tag tag = new Tag(); tag.setKey(tagLine.getKey()); tag.setValue(tagLine.getValue()); tags.add(tag); } } return tags; }  }
ServiceCatalogUtil { public static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter) { if (StringUtils.isEmpty(provisioningTags)) { return new ArrayList<>(); } final List<Tag> tags = new ArrayList<>(); for (String line : provisioningTags.split(delimiter)) { final ParametersLine tagLine = new ParametersLine(line); if (tagLine.isValid()) { final Tag tag = new Tag(); tag.setKey(tagLine.getKey()); tag.setValue(tagLine.getValue()); tags.add(tag); } } return tags; }  static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter); static List<ProvisioningParameter> toArrayOfParameters(final String parameters, final String delimiter); static List<UpdateProvisioningParameter> toArrayOfUpdateParameters(final String updateParameters, final String delimiter, final boolean usePreviousValue); static Stack getStack(List<Stack> stacks); }
ServiceCatalogUtil { public static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter) { if (StringUtils.isEmpty(provisioningTags)) { return new ArrayList<>(); } final List<Tag> tags = new ArrayList<>(); for (String line : provisioningTags.split(delimiter)) { final ParametersLine tagLine = new ParametersLine(line); if (tagLine.isValid()) { final Tag tag = new Tag(); tag.setKey(tagLine.getKey()); tag.setValue(tagLine.getValue()); tags.add(tag); } } return tags; }  static List<Tag> toArrayOfTags(final String provisioningTags, final String delimiter); static List<ProvisioningParameter> toArrayOfParameters(final String parameters, final String delimiter); static List<UpdateProvisioningParameter> toArrayOfUpdateParameters(final String updateParameters, final String delimiter, final boolean usePreviousValue); static Stack getStack(List<Stack> stacks);  }