ChannelCache class

Cache for Channels

Inheritance

Properties

asMap Map<Snowflake, IChannel>
Returns cache as Map
no setterinherited
count int
Get number of elements from cache
no setterinherited
first IChannel?
Get first element
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
keys Iterable<Snowflake>
Returns key's values of cache
no setterinherited
last IChannel
Get last element
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<IChannel>
Returns values of cache
no setterinherited

Methods

add(Snowflake key, IChannel value) → void
Add to cache value associated with key
inherited
addIfAbsent(Snowflake key, IChannel item) IChannel
Puts item to collection if key doesn't exist in cache
inherited
addMap(Map<Snowflake, IChannel> mp) → void
Add Map to cache.
inherited
dispose() Future<void>
Perform cleanup
override
find(bool predicate(IChannel item)) Iterable<IChannel>
Find matching items based of predicate
inherited
findOne(bool predicate(IChannel item)) IChannel?
Find one element in cache
inherited
forEach(void f(Snowflake, IChannel)) → 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(IChannel value) bool
Returns true if cache contains value
inherited
invalidate() → void
Clear cache
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(Snowflake key) → void
Remove key with associated with it value
inherited
removeWhere(bool predicate(Snowflake key, IChannel value)) → void
Remove everything where predicate is true
inherited
take(int count) Iterable<IChannel>
Take count elements from cache. Returns Iterable of cache values
inherited
takeLast(int count) Iterable<IChannel>
Takes count last elements from cache. Returns Iterable of cache values
inherited
toString() String
A string representation of this object.
inherited

Operators

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