思特奇智慧酒店云平台 v0.0.5版本的 MD5 值为:dedb172bb322639d79d7e0e26262fb5c
以下内容为反编译后的 RSMSet.java 源代码,内容仅作参考
package org.jivesoftware.smackx.rsm.packet;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class RSMSet implements ExtensionElement {
public static final String ELEMENT = "set";
public static final String NAMESPACE = "http://jabber.org/protocol/rsm";
public final String after;
public final String before;
public final int count;
public final int firstIndex;
public final String firstString;
public final int index;
public final String last;
public final int max;
public static class AnonymousClass1 {
public static final int[] $SwitchMap$org$jivesoftware$smackx$rsm$packet$RSMSet$PageDirection = new int[PageDirection.values().length];
static {
try {
$SwitchMap$org$jivesoftware$smackx$rsm$packet$RSMSet$PageDirection[PageDirection.before.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
$SwitchMap$org$jivesoftware$smackx$rsm$packet$RSMSet$PageDirection[PageDirection.after.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
}
}
public enum PageDirection {
before,
after
}
public RSMSet(int i) {
this(i, -1);
}
public static RSMSet from(Stanza stanza) {
return (RSMSet) stanza.getExtension(ELEMENT, NAMESPACE);
}
public static RSMSet newAfter(String str) {
return new RSMSet(str, PageDirection.after);
}
public static RSMSet newBefore(String str) {
return new RSMSet(str, PageDirection.before);
}
public String getAfter() {
return this.after;
}
public String getBefore() {
return this.before;
}
public int getCount() {
return this.count;
}
@Override
public String getElementName() {
return ELEMENT;
}
public String getFirst() {
return this.firstString;
}
public int getFirstIndex() {
return this.firstIndex;
}
public int getIndex() {
return this.index;
}
public String getLast() {
return this.last;
}
public int getMax() {
return this.max;
}
@Override
public String getNamespace() {
return NAMESPACE;
}
public RSMSet(int i, int i2) {
this(null, null, -1, i2, null, i, null, -1);
}
@Override
public XmlStringBuilder toXML(String str) {
XmlStringBuilder xmlStringBuilder = new XmlStringBuilder((ExtensionElement) this);
xmlStringBuilder.rightAngleBracket();
xmlStringBuilder.optElement("after", this.after);
xmlStringBuilder.optElement("before", this.before);
xmlStringBuilder.optIntElement("count", this.count);
if (this.firstString != null) {
xmlStringBuilder.halfOpenElement("first");
xmlStringBuilder.optIntAttribute("index", this.firstIndex);
xmlStringBuilder.rightAngleBracket();
xmlStringBuilder.append((CharSequence) this.firstString);
xmlStringBuilder.closeElement("first");
}
xmlStringBuilder.optIntElement("index", this.index);
xmlStringBuilder.optElement("last", this.last);
xmlStringBuilder.optIntElement("max", this.max);
xmlStringBuilder.closeElement(this);
return xmlStringBuilder;
}
public RSMSet(String str, PageDirection pageDirection) {
this(-1, str, pageDirection);
}
public RSMSet(int i, String str, PageDirection pageDirection) {
int i2 = AnonymousClass1.$SwitchMap$org$jivesoftware$smackx$rsm$packet$RSMSet$PageDirection[pageDirection.ordinal()];
if (i2 == 1) {
this.before = str;
this.after = null;
} else if (i2 == 2) {
this.before = null;
this.after = str;
} else {
throw new AssertionError();
}
this.count = -1;
this.index = -1;
this.last = null;
this.max = i;
this.firstString = null;
this.firstIndex = -1;
}
public RSMSet(String str, String str2, int i, int i2, String str3, int i3, String str4, int i4) {
this.after = str;
this.before = str2;
this.count = i;
this.index = i2;
this.last = str3;
this.max = i3;
this.firstString = str4;
this.firstIndex = i4;
}
}