Interface SortedChannelCacheView<T extends Channel & Comparable<? super T>>

Type Parameters:
T - The channel type
All Superinterfaces:
CacheView<T>, ChannelCacheView<T>, Iterable<T>, SnowflakeCacheView<T>, SortedSnowflakeCacheView<T>

public interface SortedChannelCacheView<T extends Channel & Comparable<? super T>> extends ChannelCacheView<T>, SortedSnowflakeCacheView<T>
Specialized ChannelCacheView type used for handling sorted lists of channels.
Sorting is done with respect to the positioning in the official Discord client, by comparing positions and category information.

Internally, this cache view makes a distinction between the varying ChannelTypes and provides convenient methods to access a filtered subset.

See Also:
  • Method Details

    • ofType

      @Nonnull <C extends T> SortedChannelCacheView<C> ofType(@Nonnull Class<C> type)
      Description copied from interface: ChannelCacheView
      Creates a decorator around this cache, filtered to only provide access to the given type.
      Specified by:
      ofType in interface ChannelCacheView<T extends Channel & Comparable<? super T>>
      Type Parameters:
      C - The type parameter
      Parameters:
      type - The type class (Like TextChannel.class)
      Returns:
      The filtered cache view