Class MemberCacheViewImpl
java.lang.Object
net.dv8tion.jda.internal.utils.cache.ReadWriteLockCache<Member>
net.dv8tion.jda.internal.utils.cache.AbstractCacheView<Member>
net.dv8tion.jda.internal.utils.cache.SnowflakeCacheViewImpl<Member>
net.dv8tion.jda.internal.utils.cache.MemberCacheViewImpl
- All Implemented Interfaces:
Iterable<Member>
,CacheView<Member>
,MemberCacheView
,SnowflakeCacheView<Member>
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
CacheView.SimpleCacheView<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetElementById
(long id) Retrieves the entity represented by the provided ID.getElementsByNickname
(String name, boolean ignoreCase) Creates an immutable list of all members matching the given nickname.getElementsByUsername
(String name, boolean ignoreCase) Creates an immutable list of all members matching the given username.getElementsWithRoles
(Collection<Role> roles) Creates an immutable list of all members that hold all of the provided roles.getElementsWithRoles
(Role... roles) Creates an immutable list of all members that hold all of the provided roles.Methods inherited from class net.dv8tion.jda.internal.utils.cache.AbstractCacheView
asList, asSet, clear, equals, forEach, get, getElementsByName, getMap, hashCode, isEmpty, iterator, keySet, lockedIterator, parallelStream, remove, size, spliterator, stream, toString
Methods inherited from class net.dv8tion.jda.internal.utils.cache.ReadWriteLockCache
clearCachedLists, readLock, writeLock
Methods inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
acceptStream, applyStream, asList, asSet, collect, forEachUnordered, getElementsByName, getElementsByName, isEmpty, lockedIterator, parallelStream, size, stream
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
Methods inherited from interface net.dv8tion.jda.api.utils.cache.MemberCacheView
getElementById, getElementsByNickname, getElementsByUsername
-
Constructor Details
-
MemberCacheViewImpl
public MemberCacheViewImpl()
-
-
Method Details
-
getElementById
Description copied from interface:SnowflakeCacheView
Retrieves the entity represented by the provided ID.- Specified by:
getElementById
in interfaceMemberCacheView
- Specified by:
getElementById
in interfaceSnowflakeCacheView<Member>
- Overrides:
getElementById
in classSnowflakeCacheViewImpl<Member>
- Parameters:
id
- The ID of the entity- Returns:
- Possibly-null entity for the specified ID
-
getElementsByUsername
Description copied from interface:MemberCacheView
Creates an immutable list of all members matching the given username.
This will check the name of the wrapped user.- Specified by:
getElementsByUsername
in interfaceMemberCacheView
- Parameters:
name
- The name to checkignoreCase
- Whether to ignore case when comparing usernames- Returns:
- Immutable list of members with the given username
-
getElementsByNickname
Description copied from interface:MemberCacheView
Creates an immutable list of all members matching the given nickname.
This will check the nickname of the member. If provided withnull
this will check for members that have no nickname set.- Specified by:
getElementsByNickname
in interfaceMemberCacheView
- Parameters:
name
- The nullable nickname to checkignoreCase
- Whether to ignore case when comparing nicknames- Returns:
- Immutable list of members with the given nickname
-
getElementsWithRoles
Description copied from interface:MemberCacheView
Creates an immutable list of all members that hold all of the provided roles.- Specified by:
getElementsWithRoles
in interfaceMemberCacheView
- Parameters:
roles
- Roles the members should have- Returns:
- Immutable list of members with the given roles
-
getElementsWithRoles
Description copied from interface:MemberCacheView
Creates an immutable list of all members that hold all of the provided roles.- Specified by:
getElementsWithRoles
in interfaceMemberCacheView
- Parameters:
roles
- Roles the members should have- Returns:
- Immutable list of members with the given roles
-