1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-12-12 14:01:08 +01:00

Enfore spaces for indentation

Although I'm in the tabs camp, Smack uses mostly spaces. Therefore it
is the logical choice for the indentation style.
This commit is contained in:
Florian Schmaus 2017-02-07 22:02:40 +01:00
parent ffe9397e66
commit ef0af66b21
125 changed files with 5336 additions and 5344 deletions

View file

@ -31,77 +31,77 @@ import org.xmlpull.v1.XmlPullParserException;
*/
public class Nick implements ExtensionElement {
public static final String NAMESPACE = "http://jabber.org/protocol/nick";
public static final String NAMESPACE = "http://jabber.org/protocol/nick";
public static final String ELEMENT_NAME = "nick";
public static final String ELEMENT_NAME = "nick";
private String name = null;
private String name = null;
public Nick(String name) {
this.name = name;
}
public Nick(String name) {
this.name = name;
}
/**
* The value of this nickname.
*
* @return the nickname
*/
public String getName() {
return name;
}
/**
* The value of this nickname.
*
* @return the nickname
*/
public String getName() {
return name;
}
/**
* Sets the value of this nickname.
*
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
/**
* Sets the value of this nickname.
*
* @param name
* the name to set
*/
public void setName(String name) {
this.name = name;
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#getElementName()
*/
public String getElementName() {
return ELEMENT_NAME;
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#getElementName()
*/
public String getElementName() {
return ELEMENT_NAME;
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#getNamespace()
*/
public String getNamespace() {
return NAMESPACE;
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#getNamespace()
*/
public String getNamespace() {
return NAMESPACE;
}
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#toXML()
*/
public String toXML() {
final StringBuilder buf = new StringBuilder();
/*
* (non-Javadoc)
*
* @see org.jivesoftware.smack.packet.PacketExtension#toXML()
*/
public String toXML() {
final StringBuilder buf = new StringBuilder();
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(
NAMESPACE).append("\">");
buf.append(getName());
buf.append("</").append(ELEMENT_NAME).append('>');
buf.append('<').append(ELEMENT_NAME).append(" xmlns=\"").append(
NAMESPACE).append("\">");
buf.append(getName());
buf.append("</").append(ELEMENT_NAME).append('>');
return buf.toString();
}
return buf.toString();
}
public static class Provider extends ExtensionElementProvider<Nick> {
public static class Provider extends ExtensionElementProvider<Nick> {
@Override
public Nick parse(XmlPullParser parser, int initialDepth)
throws XmlPullParserException, IOException {
final String name = parser.nextText();
final String name = parser.nextText();
return new Nick(name);
}
}
return new Nick(name);
}
}
}