Package org.jivesoftware.openfire.group
Interface GroupAwareMap<K,V>
-
- All Superinterfaces:
Map<K,V>
- All Known Implementing Classes:
ConcurrentGroupMap
public interface GroupAwareMap<K,V> extends Map<K,V>
This map specifies additional methods that understand groups among the entries in the map.- Author:
- Tom Evans
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<Group>
getGroupsFromKeys()
Returns the groups that are implied (resolvable) from the keys in the map.Set<Group>
getGroupsFromValues()
Returns the groups that are implied (resolvable) from the values in the map.boolean
includesKey(Object key)
Returns true if the map's keySet contains the given JID.boolean
includesValue(Object value)
Returns true if the map contains a value referencing the given JID.-
Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
includesKey
boolean includesKey(Object key)
Returns true if the map's keySet contains the given JID. If the JID is not found explicitly, search the keySet for groups and look for the JID in each of the corresponding groups.- Parameters:
key
- The target, presumably a JID- Returns:
- True if the target is in the key list, or in any groups in the key list
-
includesValue
boolean includesValue(Object value)
Returns true if the map contains a value referencing the given JID. If the JID is not found explicitly, search the values for groups and look for the JID in each of the corresponding groups.- Parameters:
value
- The target, presumably a JID- Returns:
- True if the target is in the key list, or in any groups in the key list
-
getGroupsFromKeys
Set<Group> getGroupsFromKeys()
Returns the groups that are implied (resolvable) from the keys in the map.- Returns:
- A new Set containing the groups in the keySet
-
-