Package org.jivesoftware.openfire.group
Class ConcurrentGroupList<T>
java.lang.Object
java.util.concurrent.CopyOnWriteArrayList<T>
org.jivesoftware.openfire.group.ConcurrentGroupList<T>
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<T>,Collection<T>,List<T>,RandomAccess,GroupAwareList<T>
This list specifies additional methods that understand groups among
the items in the list.
- Author:
- Tom Evans
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanbooleanaddAll(int index, Collection<? extends T> c) booleanaddAll(Collection<? extends T> c) intaddAllAbsent(Collection<? extends T> c) booleanaddIfAbsent(T e) voidclear()Returns the groups that are implied (resolvable) from the items in the list.booleanReturns true if the list contains the given JID.remove(int index) booleanbooleanremoveAll(Collection<?> c) booleanretainAll(Collection<?> c) Methods inherited from class java.util.concurrent.CopyOnWriteArrayList
clone, contains, containsAll, equals, forEach, get, hashCode, indexOf, indexOf, isEmpty, iterator, lastIndexOf, lastIndexOf, listIterator, listIterator, removeIf, replaceAll, size, sort, spliterator, subList, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, replaceAll, size, sort, spliterator, subList, toArray, toArray
-
Constructor Details
-
ConcurrentGroupList
public ConcurrentGroupList() -
ConcurrentGroupList
-
-
Method Details
-
includes
Returns true if the list contains the given JID. If the JID is not found in the list, search the list for groups and look for the JID in each of the corresponding groups.- Specified by:
includesin interfaceGroupAwareList<T>- Parameters:
value- The target, presumably a JID- Returns:
- True if the target is in the list, or in any groups in the list
-
getGroups
Returns the groups that are implied (resolvable) from the items in the list.- Specified by:
getGroupsin interfaceGroupAwareList<T>- Returns:
- A Set containing the groups in the list
-
set
-
add
- Specified by:
addin interfaceCollection<T>- Specified by:
addin interfaceList<T>- Overrides:
addin classCopyOnWriteArrayList<T>
-
add
-
remove
-
remove
- Specified by:
removein interfaceCollection<T>- Specified by:
removein interfaceList<T>- Overrides:
removein classCopyOnWriteArrayList<T>
-
addIfAbsent
- Overrides:
addIfAbsentin classCopyOnWriteArrayList<T>
-
removeAll
- Specified by:
removeAllin interfaceCollection<T>- Specified by:
removeAllin interfaceList<T>- Overrides:
removeAllin classCopyOnWriteArrayList<T>
-
retainAll
- Specified by:
retainAllin interfaceCollection<T>- Specified by:
retainAllin interfaceList<T>- Overrides:
retainAllin classCopyOnWriteArrayList<T>
-
addAllAbsent
- Overrides:
addAllAbsentin classCopyOnWriteArrayList<T>
-
clear
public void clear()- Specified by:
clearin interfaceCollection<T>- Specified by:
clearin interfaceList<T>- Overrides:
clearin classCopyOnWriteArrayList<T>
-
addAll
- Specified by:
addAllin interfaceCollection<T>- Specified by:
addAllin interfaceList<T>- Overrides:
addAllin classCopyOnWriteArrayList<T>
-
addAll
-