CountTable<K> class

A count table for K elements.

Constructors

CountTable()

Properties

entries Iterable<MapEntry<K, int>>
Returns the entries in the counting table.
no setter
hashCode int
The hash code for this object.
no setterinherited
highest → K
Returns the K element with highest counting value.
no setter
isEmpty bool
Returns true if the counting table is empty.
no setter
isNotEmpty bool
Same as ![isEmpty].
no setter
keys Iterable<K>
Returns the keys K in the counting table.
no setter
keysSorted Iterable<K>
Returns the keys K in the counting table sorted by count value.
no setter
length int
The number of entries in the counting table.
no setter
lowest → K
Returns the K element with lowest counting value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clears the counting table.
copy({bool filter(K key, int count)?}) CountTable<K>
decrement(K key) → void
Decrements the counter of key.
decrementBy(K key, int amount) → void
Decrements the counter of key by amount.
get(K key) int?
Returns the counting value of key.
increment(K key) → void
Increments the counter of key.
incrementBy(K key, int amount) → void
Increments the counter of key by amount.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remove(K key) int?
Removes the counter of key.
set(K key, int count) → void
Sets the counter of key with count.
toMap() Map<K, int>
Converts this counting table to a Map.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited
operator [](K key) → dynamic
Operator alias to get.
operator []=(K key, int count) → void
Operator alias to set.