Package net.dv8tion.jda.api.utils.cache
Interface SnowflakeCacheView<T extends ISnowflake>
- All Known Subinterfaces:
ChannelCacheView<T>
,MemberCacheView
,SortedChannelCacheView<T>
,SortedSnowflakeCacheView<T>
CacheView
implementation
specifically to view ISnowflake
implementations.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.utils.cache.CacheView
CacheView.SimpleCacheView<T>
-
Method Summary
Modifier and TypeMethodDescriptiongetElementById
(long id) Retrieves the entity represented by the provided ID.default T
getElementById
(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
Methods inherited from interface java.lang.Iterable
forEach, iterator, spliterator
-
Method Details
-
getElementById
Retrieves the entity represented by the provided ID.- Parameters:
id
- The ID of the entity- Returns:
- Possibly-null entity for the specified ID
-
getElementById
Retrieves the entity represented by the provided ID.- Parameters:
id
- The ID of the entity- Returns:
- Possibly-null entity for the specified ID
- Throws:
NumberFormatException
- If the provided String isnull
or cannot be resolved to an unsigned long id
-