mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
Add new RSMSet constructors
and fix typo in RSMSetManager
This commit is contained in:
parent
5a9e353f2c
commit
bd0fb973c8
2 changed files with 13 additions and 1 deletions
|
@ -33,7 +33,7 @@ public class RSMManager {
|
||||||
return packetExtensions;
|
return packetExtensions;
|
||||||
}
|
}
|
||||||
|
|
||||||
Collection<PacketExtension> contiunePage(int max, Collection<PacketExtension> returnedExtensions) {
|
Collection<PacketExtension> continuePage(int max, Collection<PacketExtension> returnedExtensions) {
|
||||||
return continuePage(max, returnedExtensions, null);
|
return continuePage(max, returnedExtensions, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,10 @@ public class RSMSet implements PacketExtension {
|
||||||
this(null, null, -1, index, null, max, null, -1);
|
this(null, null, -1, index, null, max, null, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RSMSet(String item, PageDirection pageDirection) {
|
||||||
|
this(-1, item, pageDirection);
|
||||||
|
}
|
||||||
|
|
||||||
public RSMSet(int max, String item, PageDirection pageDirection) {
|
public RSMSet(int max, String item, PageDirection pageDirection) {
|
||||||
switch (pageDirection) {
|
switch (pageDirection) {
|
||||||
case before:
|
case before:
|
||||||
|
@ -146,4 +150,12 @@ public class RSMSet implements PacketExtension {
|
||||||
public static RSMSet from(Packet packet) {
|
public static RSMSet from(Packet packet) {
|
||||||
return (RSMSet) packet.getExtension(ELEMENT, NAMESPACE);
|
return (RSMSet) packet.getExtension(ELEMENT, NAMESPACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static RSMSet newAfter(String after) {
|
||||||
|
return new RSMSet(after, PageDirection.after);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RSMSet newBefore(String before) {
|
||||||
|
return new RSMSet(before, PageDirection.before);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue