Class UnifiedCacheViewImpl.UnifiedMemberCacheViewImpl
java.lang.Object
net.dv8tion.jda.internal.utils.cache.UnifiedCacheViewImpl<Member,MemberCacheView>
net.dv8tion.jda.internal.utils.cache.UnifiedCacheViewImpl.UnifiedMemberCacheViewImpl
- All Implemented Interfaces:
Iterable<Member>
,CacheView<Member>
,UnifiedMemberCacheView
- Enclosing class:
UnifiedCacheViewImpl<T,
E extends CacheView<T>>
public static class UnifiedCacheViewImpl.UnifiedMemberCacheViewImpl
extends UnifiedCacheViewImpl<Member,MemberCacheView>
implements UnifiedMemberCacheView
-
Nested Class Summary
Nested classes/interfaces inherited from class net.dv8tion.jda.internal.utils.cache.UnifiedCacheViewImpl
UnifiedCacheViewImpl.UnifiedMemberCacheViewImpl, UnifiedCacheViewImpl.UnifiedSnowflakeCacheView<T extends ISnowflake>
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
CacheView.SimpleCacheView<T>
-
Constructor Summary
ConstructorsConstructorDescriptionUnifiedMemberCacheViewImpl
(Supplier<? extends Stream<? extends MemberCacheView>> generator) -
Method Summary
Modifier and TypeMethodDescriptiongetElementsById
(long id) Retrieves all member 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.UnifiedCacheViewImpl
asList, asSet, forEach, getElementsByName, isEmpty, iterator, lockedIterator, parallelStream, size, stream
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
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.UnifiedMemberCacheView
getElementsById, getElementsByNickname, getElementsByUsername
-
Constructor Details
-
UnifiedMemberCacheViewImpl
-
-
Method Details
-
getElementsById
Description copied from interface:UnifiedMemberCacheView
Retrieves all member represented by the provided ID.- Specified by:
getElementsById
in interfaceUnifiedMemberCacheView
- Parameters:
id
- The ID of the members- Returns:
- Possibly-empty unmodifiable list of member for the specified ID
-
getElementsByUsername
Description copied from interface:UnifiedMemberCacheView
Creates an immutable list of all members matching the given username.
This will check the name of the wrapped user.- Specified by:
getElementsByUsername
in interfaceUnifiedMemberCacheView
- 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:UnifiedMemberCacheView
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 interfaceUnifiedMemberCacheView
- 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:UnifiedMemberCacheView
Creates an immutable list of all members that hold all of the provided roles.- Specified by:
getElementsWithRoles
in interfaceUnifiedMemberCacheView
- Parameters:
roles
- Roles the members should have- Returns:
- Immutable list of members with the given roles
-
getElementsWithRoles
Description copied from interface:UnifiedMemberCacheView
Creates an immutable list of all members that hold all of the provided roles.- Specified by:
getElementsWithRoles
in interfaceUnifiedMemberCacheView
- Parameters:
roles
- Roles the members should have- Returns:
- Immutable list of members with the given roles
-