Package net.dv8tion.jda.api.utils.cache
Interface ShardCacheView
-
-
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 JDAgetElementById(int id)Retrieves the JDA instance represented by the provided shard ID.default JDAgetElementById(java.lang.String id)Retrieves the JDA instance represented by the provided shard ID ornullif none of the connected shards match 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 JDA getElementById(int id)
Retrieves the JDA instance represented by the provided shard ID.- Parameters:
id- The ID of the entity- Returns:
- Possibly-null entity for the specified shard ID
-
getElementById
@Nullable default JDA getElementById(@Nonnull java.lang.String id)
Retrieves the JDA instance represented by the provided shard ID ornullif none of the connected shards match the provided id.- Parameters:
id- The ID of the shard- Returns:
- Possibly-null entity for the specified shard ID
- Throws:
java.lang.NumberFormatException- If the provided String isnullor cannot be resolved to an unsigned int id
-
-