public void attribute(String name, boolean value, boolean defaultValue) { if (value != defaultValue) { attribute(name, value); } }
public void attribute(String name, boolean value, boolean defaultValue) { if (value != defaultValue) { attribute(name, value); } }
public void attributeOptional(String name, String value) { if (value != null && value.length() > 0) { attribute(name, value); } }
public void attributeOptional(String name, String value) { if (value != null && value.length() > 0) { attribute(name, value); } }
public void attribute(String name, boolean value) { attribute(name, Boolean.toString(value)); }
public void attribute(String name, boolean value) { attribute(name, Boolean.toString(value)); }
public void attribute(String name, int value) { attribute(name, Integer.toString(value)); }
public void attribute(String name, int value) { attribute(name, Integer.toString(value)); }
public void writeProperties(String propertiesElement, Map<String, String> properties) { if (properties != null && properties.size() > 0) { start(propertiesElement); attribute(COLLECTION_SIZE_ATTRIBUTE, properties.size()); for (Entry<String, String> entry : properties.entrySet()) { writeProperty(entry.getKey(), entry.getValue()); } end(propertiesElement); } }
public void writeProperties(String propertiesElement, Map<String, String> properties) { if (properties != null && properties.size() > 0) { start(propertiesElement); attribute(COLLECTION_SIZE_ATTRIBUTE, properties.size()); for (Entry<String, String> entry : properties.entrySet()) { writeProperty(entry.getKey(), entry.getValue()); } end(propertiesElement); } }