dart_kollection library

Classes

KCollection<T>
A generic collection of elements. Methods in this interface support only read-only access to the collection; read/write access is supported through the KMutableCollection interface. @param E the type of elements contained in the collection. The collection is covariant on its element type.
KCollectionExtension<T>
KHashMap<K, V>
KHashSet<T>
KIterable<T>
Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over. @param T the type of element being iterated over. The iterator is covariant on its element type.
KIterableExtension<T>
KIterator<T>
An iterator over a collection or another entity that can be represented as a sequence of elements. Allows to sequentially access the elements.
KLinkedMap<K, V>
KLinkedSet<T>
KList<T>
A generic ordered collection of elements. Methods in this interface support only read-only access to the list; read/write access is supported through the KMutableList interface. @param T the type of elements contained in the list. The list is covariant on its element type.
KListExtension<T>
KListIterator<T>
An iterator over a collection that supports indexed access.
KMap<K, V>
A collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key. Methods in this interface support only read-only access to the map; read-write access is supported through the KMutableMap interface. @param K the type of map keys. The map is invariant on its key type, as it can accept key as a parameter (of containsKey for example) and return it in keys set. @param V the type of map values. The map is covariant on its value type.
KMapEntry<K, V>
Represents a key/value pair held by a KMap.
KMapExtension<K, V>
KMutableCollection<T>
A generic collection of elements that supports adding and removing elements. [...]
KMutableCollectionExtension<T>
KMutableIterable<T>
Classes that inherit from this interface can be represented as a sequence of elements that can be iterated over and that supports removing elements during iteration. @param T the type of element being iterated over. The mutable iterator is invariant on its element type.
KMutableIterableExtension<T>
KMutableIterator<T>
An iterator over a mutable collection. Provides the ability to remove elements while iterating. @see MutableCollection.iterator
KMutableList<T>
A generic ordered collection of elements that supports adding and removing elements. @param E the type of elements contained in the list. The mutable list is invariant on its element type.
KMutableListExtension<T>
KMutableListIterator<T>
An iterator over a mutable collection that supports indexed access. Provides the ability to add, modify and remove elements while iterating.
KMutableMap<K, V>
A modifiable collection that holds pairs of objects (keys and values) and supports efficiently retrieving the value corresponding to each key. Map keys are unique; the map holds only one value for each key. @param K the type of map keys. The map is invariant on its key type. @param V the type of map values. The mutable map is invariant on its value type.
KMutableMapEntry<K, V>
Represents a key/value pair held by a KMutableMap.
KMutableMapExtension<K, V>
KMutableSet<T>
A generic unordered collection of elements that does not support duplicate elements, and supports adding and removing elements. @param T the type of elements contained in the set. The mutable set is invariant on its element type.
KPair<A, B>
Represents a generic pair of two values. [...]
KSet<T>
A generic unordered collection of elements that does not support duplicate elements. Methods in this interface support only read-only access to the set; read/write access is supported through the KMutableSet interface. @param E the type of elements contained in the set. The set is covariant on its element type.
KTriple<A, B, C>
Represents a triad of values [...]
TooGeneric
A method annotated with @tooGeneric is a indicator that the method is defined for a generic type T but only works for type X where X extends T. [...]

Constants

nonNull → const Object
An element annotated with @notNull claims null value is forbidden to return (for methods), pass to (parameters) and hold (local variables and fields). [...]
const _NonNull()
nullable → const Object
An element annotated with @nullable claims null value is perfectly valid to return (for methods), pass to (parameters) and hold (local variables and fields). [...]
const _Nullable()
tooGeneric → const Object
A method annotated with @tooGeneric is a indicator that the method is defined for a generic type T but only works for type X where X extends T. [...]
const TooGeneric()

Functions

compareBy<T>(Comparable selector(T)) → Comparator<T>
Creates a comparator using the function to transform value to a Comparable instance for comparison.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
compareByDescending<T>(Comparable selector(T)) → Comparator<T>
Creates a descending comparator using the function to transform value to a Comparable instance for comparison.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
emptyList<T>() KList<T>
Returns an empty read-only list.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
emptyMap<K, V>() KMap<K, V>
Returns an empty read-only map of specified type.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
emptySet<T>() KSet<T>
Returns an empty read-only set.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
hashMapFrom<K, V>([Map<K, V> map = const {} ]) KMutableMap<K, V>
Returns a new HashMap with the specified contents, given as a list of pairs where the first component is the key and the second is the value.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
hashSetFrom<T>([Iterable<T> elements = const [] ]) KMutableSet<T>
Returns a new HashSet based on elements. Elements of the set are iterated in unpredictable order.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
hashSetOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KHashSet<T>
Returns a new KMutableSet based on HashSet with the given elements. Elements of the set are iterated in unpredictable order. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
linkedMapFrom<K, V>([Map<K, V> map = const {} ]) KMutableMap<K, V>
Returns a new LinkedHashMap with the specified contents, given as a list of pairs where the first component is the key and the second is the value. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
linkedSetFrom<T>([Iterable<T> elements = const [] ]) KLinkedSet<T>
Returns a new LinkedHashSet based on elements. Elements of the set are iterated in the order they were specified.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
linkedSetOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KLinkedSet<T>
Returns a new KMutableSet based on LinkedHashSet with the given elements. Elements of the set are iterated in the order they were specified. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
listFrom<T>([Iterable<T> elements = const [] ]) KList<T>
Returns a new read-only list based on elements.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
listOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KList<T>
Returns a new read-only list of given elements. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mapFrom<K, V>([Map<K, V> map = const {} ]) KMap<K, V>
Returns an immutable map, mapping only the specified key to the specified value.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mutableListFrom<T>([Iterable<T> elements = const [] ]) KMutableList<T>
Returns a new mutable list based on elements.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mutableListOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KMutableList<T>
Returns a new mutable list of given elements. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mutableMapFrom<K, V>([Map<K, V> map = const {} ]) KMutableMap<K, V>
Returns a new MutableMap with the specified contents, given as a list of pairs where the first component is the key and the second is the value. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mutableSetFrom<T>([Iterable<T> elements = const [] ]) KMutableSet<T>
Returns a new LinkedHashSet based on elements. Elements of the set are iterated in the order they were specified.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
mutableSetOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KMutableSet<T>
Returns a new KMutableSet based on LinkedHashSet with the given elements. Elements of the set are iterated in the order they were specified. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
naturalOrder<T>() → Comparator<T>
Returns a comparator that compares Comparable objects in natural order.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
reverse<T>(Comparator<T> comparator) → Comparator<T>
Returns a comparator that imposes the reverse ordering of this comparator.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
reverseOrder<T>() → Comparator<T>
Returns a comparator that compares Comparable objects in reversed natural order.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
setFrom<T>([Iterable<T> elements = const [] ]) KSet<T>
Returns a new read-only set based on elements. Elements of the set are iterated in the order they were specified.
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")
setOf<T>([T arg0 T arg1 T arg2 T arg3 T arg4 T arg5 T arg6 T arg7 T arg8 T arg9 ]) KSet<T>
Returns a new read-only set with the given elements. Elements of the set are iterated in the order they were specified. [...]
@Deprecated("Please migrate to kotlin.dart https://github.com/passsy/kotlin.dart")

Exceptions / Errors

IndexOutOfBoundsException
NoSuchElementException