Package org.jivesoftware.openfire.user
Class UserCollection
- java.lang.Object
-
- java.util.AbstractCollection<User>
-
- org.jivesoftware.openfire.user.UserCollection
-
- All Implemented Interfaces:
Iterable<User>
,Collection<User>
public class UserCollection extends AbstractCollection<User>
Provides a view of an array of usernames as a Collection of User objects. If any of the usernames cannot be loaded, they are transparently skipped when iterating over the collection.- Author:
- Matt Tucker
-
-
Constructor Summary
Constructors Constructor Description UserCollection(String[] elements)
Constructs a new UserCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<User>
iterator()
int
size()
-
Methods inherited from class java.util.AbstractCollection
add, addAll, clear, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
equals, hashCode, parallelStream, removeIf, spliterator, stream, toArray
-
-
-
-
Constructor Detail
-
UserCollection
public UserCollection(String[] elements)
Constructs a new UserCollection.- Parameters:
elements
- the initial set of users
-
-
Method Detail
-
iterator
public Iterator<User> iterator()
- Specified by:
iterator
in interfaceCollection<User>
- Specified by:
iterator
in interfaceIterable<User>
- Specified by:
iterator
in classAbstractCollection<User>
-
size
public int size()
- Specified by:
size
in interfaceCollection<User>
- Specified by:
size
in classAbstractCollection<User>
-
-