mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Temp
This commit is contained in:
parent
59e79ef668
commit
7658369d63
26 changed files with 268 additions and 356 deletions
|
@ -271,6 +271,11 @@ public class XmlStringBuilder implements Appendable, CharSequence {
|
|||
return attribute(name, String.valueOf(value));
|
||||
}
|
||||
|
||||
public XmlStringBuilder attribute(String name, long value) {
|
||||
assert name != null;
|
||||
return attribute(name, String.valueOf(value));
|
||||
}
|
||||
|
||||
public XmlStringBuilder optAttribute(String name, String value) {
|
||||
if (value != null) {
|
||||
attribute(name, value);
|
||||
|
@ -278,6 +283,13 @@ public class XmlStringBuilder implements Appendable, CharSequence {
|
|||
return this;
|
||||
}
|
||||
|
||||
public XmlStringBuilder optAttribute(String name, Long value) {
|
||||
if (value != null) {
|
||||
attribute(name, value);
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a new attribute to this builder, with the {@link java.util.Date} instance as its value,
|
||||
* which will get formated with {@link XmppDateTime#formatXEP0082Date(Date)}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue