mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
Return List instead of Collection where appropriate
This commit is contained in:
parent
61fd3c9dd0
commit
0136c3eb81
4 changed files with 15 additions and 18 deletions
|
@ -17,7 +17,6 @@
|
|||
|
||||
package org.jivesoftware.smackx.muc.packet;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,13 +35,13 @@ public class MUCAdmin extends IQ {
|
|||
private List<Item> items = new ArrayList<Item>();
|
||||
|
||||
/**
|
||||
* Returns a Collection of item childs that holds information about roles, affiliation,
|
||||
* Returns a List of item childs that holds information about roles, affiliation,
|
||||
* jids and nicks.
|
||||
*
|
||||
* @return a Collection of item childs that holds information about roles, affiliation,
|
||||
* @return a List of item childs that holds information about roles, affiliation,
|
||||
* jids and nicks.
|
||||
*/
|
||||
public Collection<Item> getItems() {
|
||||
public List<Item> getItems() {
|
||||
synchronized (items) {
|
||||
return Collections.unmodifiableList(new ArrayList<Item>(items));
|
||||
}
|
||||
|
|
|
@ -19,7 +19,6 @@ package org.jivesoftware.smackx.muc.packet;
|
|||
import org.jivesoftware.smack.packet.IQ;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -36,13 +35,13 @@ public class MUCOwner extends IQ {
|
|||
private Destroy destroy;
|
||||
|
||||
/**
|
||||
* Returns a Collection of item childs that holds information about affiliation,
|
||||
* Returns a List of item childs that holds information about affiliation,
|
||||
* jids and nicks.
|
||||
*
|
||||
* @return a Collection of item childs that holds information about affiliation,
|
||||
* @return a List of item childs that holds information about affiliation,
|
||||
* jids and nicks.
|
||||
*/
|
||||
public Collection<Item> getItems() {
|
||||
public List<Item> getItems() {
|
||||
synchronized (items) {
|
||||
return Collections.unmodifiableList(new ArrayList<Item>(items));
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ import org.jivesoftware.smack.provider.IQProvider;
|
|||
import org.xmlpull.v1.XmlPullParser;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -39,13 +38,13 @@ public class OfflineMessageRequest extends IQ {
|
|||
private boolean fetch = false;
|
||||
|
||||
/**
|
||||
* Returns a Collection of item childs that holds information about offline messages to
|
||||
* Returns a List of item childs that holds information about offline messages to
|
||||
* view or delete.
|
||||
*
|
||||
* @return a Collection of item childs that holds information about offline messages to
|
||||
* @return a List of item childs that holds information about offline messages to
|
||||
* view or delete.
|
||||
*/
|
||||
public Collection<Item> getItems() {
|
||||
public List<Item> getItems() {
|
||||
synchronized (items) {
|
||||
return Collections.unmodifiableList(new ArrayList<Item>(items));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue