ChannelCache class

Cache for Channels

Inheritance

Properties

asMap Map<Snowflake, Channel>
Returns cache as Map
read-only, inherited
count int
Get number of elements from cache
read-only, inherited
first Channel
Get first element
read-only, inherited
hashCode int
The hash code for this object. [...]
read-only, inherited
keys Iterable<Snowflake>
Returns key's values of cache
read-only, inherited
last Channel
Get last element
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
values Iterable<Channel>
Returns values of cache
read-only, inherited

Methods

add(Snowflake key, Channel value) → void
Add to cache value associated with key
inherited
addIfAbsent(Snowflake key, Channel item) Channel
Puts item to collection if key doesn't exist in cache
inherited
addMap(Map<Snowflake, Channel> mp) → void
Add Map to cache.
inherited
dispose() Future<void>
Perform cleanup
override
find(bool predicate(Channel item)) Iterable<Channel>
Find matching items based of predicate
inherited
findOne(bool predicate(Channel item)) Channel
Find one element in cache
inherited
forEach(void f(Snowflake key, Channel value)) → void
Loop over elements from cache
inherited
get<E>(Snowflake id) → E
Allows to get channel and cast to E in one operation.
hasKey(Snowflake key) bool
Returns true if cache contains key
inherited
hasValue(Channel value) bool
Returns true if cache contains value
inherited
invalidate() → void
Clear cache
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
remove(Snowflake key) → void
Remove key with associated with it value
inherited
removeWhere(bool predicate(Snowflake key, Channel value)) → void
Remove everything where predicate is true
inherited
take(int count) Iterable<Channel>
Take count elements from cache. Returns Iterable of cache values
inherited
takeLast(int count) Iterable<Channel>
Takes count last elements from cache. Returns Iterable of cache values
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited
operator [](Snowflake key) Channel
Returns element with key key
inherited
operator []=(Snowflake key, Channel item) → void
Sets item for key
inherited