TernaryTreapList<V> class

A TernaryTreap that stores values in a List

TernaryTreapList is a function from a Key to a sequence of Values:

  • f : KV ∪ V

such that

  • K is the set of all Keys
  • V is the set of all Values
  • ℕ is the set of Natural numbers
  • V is the set of all functions ℕ ↦ V
  • V contains the empty function ∅ ↦ V

By definition the Values sequence may feature the same Value multiple times and is ordered by insertion.

The codomain of f includes the empty sequence. This allows Keys to be stored without Values, useful when you require only a set of Keys for prefix searching purposes.

Constructors

TernaryTreapList([KeyMapping keyMapping])
Construct new TernaryTreapList

Properties

depth → int
The maximum node depth of the TernaryTreap.
read-only, inherited
entries → Iterable<MapEntry<String, Iterable<V>>>
Iterates through TernaryTreap as MapEntry objects.
read-only, inherited
hashCode → int
The hash code for this object.
read-only, inherited
isEmpty → bool
Returns true if there are no keys in the TernaryTreap.
read-only, inherited
isNotEmpty → bool
Returns true if there is at least one key in the TernaryTreap.
read-only, inherited
keys → Iterable<String>
Return Iterable view of keys
read-only, inherited
length → int
The number of keys in the TernaryTreap.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited
values → Iterable<V>
Return Iterable view of values
read-only, inherited

Methods

add(String key, [V value]) → void
Insert a key and optional value.
inherited
addAll(TernaryTreap<V> other) → void
Adds all associations of other to this TernaryTreap.
inherited
addValues(String key, Iterable<V> values) → void
Add all values to specified key
inherited
asMap() → Map<String, Iterable<V>>
Return a view of this TernaryTreap as a Map
inherited
clear() → void
Removes all data from the TernaryTreap.
inherited
contains(Object key, Object value) → bool
Returns whether this TernaryTreap contains an association between [key[] and value.
inherited
containsKey(Object key) → bool
Returns whether this TernaryTreap contains key.
inherited
containsValue(Object value) → bool
Returns whether this TernaryTreap contains value at least once.
inherited
entriesByKeyPrefix(String prefix) → Iterable<MapEntry<String, Iterable<V>>>
Iterates through TernaryTreap as MapEntry objects such that only keys prefixed by mapKey(prefix) are included.
inherited
forEach(void f(String key, V value)) → void
Applies f to each key/value pair of the TernaryTreap
inherited
forEachKey(void f(String key, Iterable<V> values)) → void
Applies f to each key/value pair of the TernaryTreap where key matches specified key.
inherited
forEachKeyPrefixedBy(String prefix, void f(String key, Iterable<V> values)) → void
Applies f to each key/value pair of the TernaryTreap where key is prefixed by prefix (after KeyMapping applied).
inherited
keysByPrefix(String prefix) → Iterable<String>
Returns Iterable collection of each key of the TernaryTreap where key is prefixed by mapKey(prefix).
inherited
mapKey(String key) → String
Return key transformed by any KeyMapping specified during construction.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
remove(Object key, V value) → bool
Removes the association between the given key and value.
inherited
removeKey(Object key) → Iterable<V>
Removes key and all associated values.
inherited
removeValues(Object key) → Iterable<V>
Removes all values associated with key.
inherited
toString([String paddingChar = '-']) → String
Returns a string representation of this object.
inherited
valuesByKeyPrefix(String prefix) → Iterable<V>
Return Iterable view of values where key is prefixed by mapKey(prefix).
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited
operator [](Object key) → Iterable<V>
Return Iterable of values for specified key.
inherited
operator []=(String key, Iterable<V> values) → void
Set Iterable of values corresponding to key.
inherited