Modifier and Type | Method and Description |
---|---|
static UnifiedMemberCacheView |
all(java.util.Collection<MemberCacheView> cacheViews)
Creates a combined
UnifiedMemberCacheView
for all provided MemberCacheView implementations. |
static UnifiedMemberCacheView |
all(java.util.function.Supplier<java.util.stream.Stream<MemberCacheView>> generator)
Creates a combined
UnifiedMemberCacheView
for all provided MemberCacheView implementations. |
Member |
getElementById(long id)
Retrieves the member represented by the provided ID.
|
default Member |
getElementById(java.lang.String id)
Retrieves the member represented by the provided ID.
|
default java.util.List<Member> |
getElementsByNickname(java.lang.String name)
Creates an immutable list of all members matching the given nickname.
|
java.util.List<Member> |
getElementsByNickname(java.lang.String name,
boolean ignoreCase)
Creates an immutable list of all members matching the given nickname.
|
default java.util.List<Member> |
getElementsByUsername(java.lang.String name)
Creates an immutable list of all members matching the given username.
|
java.util.List<Member> |
getElementsByUsername(java.lang.String name,
boolean ignoreCase)
Creates an immutable list of all members matching the given username.
|
java.util.List<Member> |
getElementsWithRoles(java.util.Collection<Role> roles)
Creates an immutable list of all members that hold all
of the provided roles.
|
java.util.List<Member> |
getElementsWithRoles(Role... roles)
Creates an immutable list of all members that hold all
of the provided roles.
|
all, all, allMembers, allMembers, allSnowflakes, allSnowflakes, asList, asSet, collect, getElementsByName, getElementsByName, isEmpty, parallelStream, size, stream
Member getElementById(long id)
id
- The ID of the memberdefault Member getElementById(java.lang.String id)
id
- The ID of the memberjava.lang.NumberFormatException
- If the provided String is null
or
cannot be resolved to an unsigned long idjava.util.List<Member> getElementsByUsername(java.lang.String name, boolean ignoreCase)
name
- The name to checkignoreCase
- Whether to ignore case when comparing usernamesjava.lang.IllegalArgumentException
- If the provided name is null
default java.util.List<Member> getElementsByUsername(java.lang.String name)
name
- The name to checkjava.lang.IllegalArgumentException
- If the provided name is null
java.util.List<Member> getElementsByNickname(@Nullable java.lang.String name, boolean ignoreCase)
null
this will check for members
that have no nickname set.name
- The nullable nickname to checkignoreCase
- Whether to ignore case when comparing nicknamesdefault java.util.List<Member> getElementsByNickname(@Nullable java.lang.String name)
null
this will check for members
that have no nickname set.name
- The nullable nickname to checkjava.util.List<Member> getElementsWithRoles(Role... roles)
roles
- Roles the members should havejava.lang.IllegalArgumentException
- If provided with null
java.util.List<Member> getElementsWithRoles(java.util.Collection<Role> roles)
roles
- Roles the members should havejava.lang.IllegalArgumentException
- If provided with null
static UnifiedMemberCacheView all(java.util.function.Supplier<java.util.stream.Stream<MemberCacheView>> generator)
UnifiedMemberCacheView
for all provided MemberCacheView implementations.
generator
- Stream generator of MemberCacheView
instancesstatic UnifiedMemberCacheView all(java.util.Collection<MemberCacheView> cacheViews)
UnifiedMemberCacheView
for all provided MemberCacheView implementations.
cacheViews
- Collection of MemberCacheView instances