Package net.dv8tion.jda.api.utils.cache
Interface SnowflakeCacheView<T extends ISnowflake>
-
- All Superinterfaces:
CacheView<T>
,java.lang.Iterable<T>
- All Known Subinterfaces:
MemberCacheView
,SortedSnowflakeCacheView<T>
public interface SnowflakeCacheView<T extends ISnowflake> extends CacheView<T>
CacheView
implementation specifically to viewISnowflake
implementations.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
CacheView.SimpleCacheView<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description T
getElementById(long id)
Retrieves the entity represented by the provided ID.default T
getElementById(java.lang.String id)
Retrieves the entity represented by the provided ID.-
Methods inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
acceptStream, applyStream, asList, asSet, collect, forEachUnordered, getElementsByName, getElementsByName, isEmpty, lockedIterator, parallelStream, size, stream
-
-
-
-
Method Detail
-
getElementById
@Nullable T getElementById(long id)
Retrieves the entity represented by the provided ID.- Parameters:
id
- The ID of the entity- Returns:
- Possibly-null entity for the specified ID
-
getElementById
@Nullable default T getElementById(@Nonnull java.lang.String id)
Retrieves the entity represented by the provided ID.- Parameters:
id
- The ID of the entity- Returns:
- Possibly-null entity for the specified ID
- Throws:
java.lang.NumberFormatException
- If the provided String isnull
or cannot be resolved to an unsigned long id
-
-