1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 01:29:38 +02:00

"Smackify" HOXT code: Use Smack programming idioms

This commit is contained in:
Florian Schmaus 2015-07-01 13:39:04 +02:00
parent 4d57848a0f
commit 9ea5c0a2ce
9 changed files with 102 additions and 104 deletions

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014 Florian Schmaus
* Copyright 2014-2015 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -328,6 +328,13 @@ public class XmlStringBuilder implements Appendable, CharSequence {
return this;
}
public XmlStringBuilder optBooleanAttributeDefaultTrue(String name, boolean bool) {
if (!bool) {
sb.append(' ').append(name).append("='false'");
}
return this;
}
public XmlStringBuilder xmlnsAttribute(String value) {
optAttribute("xmlns", value);
return this;