Package net.dv8tion.jda.api.utils.cache
Interface SnowflakeCacheView<T extends ISnowflake>
-
- All Known Subinterfaces:
MemberCacheView,SortedSnowflakeCacheView<T>
public interface SnowflakeCacheView<T extends ISnowflake> extends CacheView<T>
CacheViewimplementation specifically to viewISnowflakeimplementations.
-
-
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 TgetElementById(long id)Retrieves the entity represented by the provided ID.default TgetElementById(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 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 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:
NumberFormatException- If the provided String isnullor cannot be resolved to an unsigned long id
-
-