Package org.jivesoftware.openfire.group
Class GroupCollection
- java.lang.Object
-
- java.util.AbstractCollection<Group>
-
- org.jivesoftware.openfire.group.GroupCollection
-
- All Implemented Interfaces:
Iterable<Group>
,Collection<Group>
public class GroupCollection extends AbstractCollection<Group>
Provides a view of an array of group names as a Collection of Group objects. If any of the group names cannot be loaded, they are transparently skipped when iterating over the collection.- Author:
- Matt Tucker
-
-
Constructor Summary
Constructors Constructor Description GroupCollection(String[] elements)
Constructs a new GroupCollection.GroupCollection(Collection<String> collection)
Constructs a new GroupCollection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Iterator<Group>
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
-
GroupCollection
public GroupCollection(Collection<String> collection)
Constructs a new GroupCollection.- Parameters:
collection
- the initial groups in the collection
-
GroupCollection
public GroupCollection(String[] elements)
Constructs a new GroupCollection.- Parameters:
elements
- the initial groups in the collection
-
-
Method Detail
-
iterator
@Nonnull public Iterator<Group> iterator()
- Specified by:
iterator
in interfaceCollection<Group>
- Specified by:
iterator
in interfaceIterable<Group>
- Specified by:
iterator
in classAbstractCollection<Group>
-
size
public int size()
- Specified by:
size
in interfaceCollection<Group>
- Specified by:
size
in classAbstractCollection<Group>
-
-