Package net.dv8tion.jda.api.utils.cache
Interface MemberCacheView
CacheView implementation
 specifically to view Members.
 This is done because Members do not implement ISnowflake as
 they are not globally unique but only unique per Guild!
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.dv8tion.jda.api.utils.cache.CacheViewCacheView.SimpleCacheView<T>
- 
Method SummaryModifier and TypeMethodDescriptiongetElementById(long id) Retrieves the member represented by the provided ID.default MembergetElementById(String id) Retrieves the member represented by the provided ID.getElementsByNickname(String name) Creates an immutable list of all members matching the given nickname.getElementsByNickname(String name, boolean ignoreCase) Creates an immutable list of all members matching the given nickname.getElementsByUsername(String name) Creates an immutable list of all members matching the given username.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 interface net.dv8tion.jda.api.utils.cache.CacheViewacceptStream, applyStream, asList, asSet, collect, forEachUnordered, getElementsByName, getElementsByName, isEmpty, lockedIterator, parallelStream, size, streamMethods inherited from interface java.lang.IterableforEach, iterator, spliterator
- 
Method Details- 
getElementByIdRetrieves the member represented by the provided ID.- Specified by:
- getElementByIdin interface- SnowflakeCacheView<Member>
- Parameters:
- id- The ID of the member
- Returns:
- Possibly-null member for the specified ID
 
- 
getElementByIdRetrieves the member represented by the provided ID.- Specified by:
- getElementByIdin interface- SnowflakeCacheView<Member>
- Parameters:
- id- The ID of the member
- Returns:
- Possibly-null member for the specified ID
- Throws:
- NumberFormatException- If the provided String is- nullor cannot be resolved to an unsigned long id
 
- 
getElementsByUsernameCreates an immutable list of all members matching the given username.
 This will check the name of the wrapped user.- Parameters:
- name- The name to check
- ignoreCase- Whether to ignore case when comparing usernames
- Returns:
- Immutable list of members with the given username
- Throws:
- IllegalArgumentException- If the provided name is- null
 
- 
getElementsByUsernameCreates an immutable list of all members matching the given username.
 This will check the name of the wrapped user.- Parameters:
- name- The name to check
- Returns:
- Immutable list of members with the given username
- Throws:
- IllegalArgumentException- If the provided name is- null
 
- 
getElementsByNickname@Nonnull @Unmodifiable List<Member> getElementsByNickname(@Nullable String name, boolean ignoreCase) Creates an immutable list of all members matching the given nickname.
 This will check the nickname of the member. If provided withnullthis will check for members that have no nickname set.- Parameters:
- name- The nullable nickname to check
- ignoreCase- Whether to ignore case when comparing nicknames
- Returns:
- Immutable list of members with the given nickname
 
- 
getElementsByNicknameCreates an immutable list of all members matching the given nickname.
 This will check the nickname of the member. If provided withnullthis will check for members that have no nickname set.- Parameters:
- name- The nullable nickname to check
- Returns:
- Immutable list of members with the given nickname
 
- 
getElementsWithRolesCreates an immutable list of all members that hold all of the provided roles.- Parameters:
- roles- Roles the members should have
- Returns:
- Immutable list of members with the given roles
- Throws:
- IllegalArgumentException- If provided with- null
 
- 
getElementsWithRolesCreates an immutable list of all members that hold all of the provided roles.- Parameters:
- roles- Roles the members should have
- Returns:
- Immutable list of members with the given roles
- Throws:
- IllegalArgumentException- If provided with- null
 
 
-