Module me.sbasalaev.common
Package me.sbasalaev.collection
package me.sbasalaev.collection
Collection framework.
I started using custom collection classes for several reasons:
- To separate reading and mutating interfaces - to clearly see whether collection is intended to be modified and provide only relevant API.
- To enhance collections with bulk operations, though Java 8 introduced streams which do this in a more robust way.
- And in general to provide API which I am comfortable with.
-
ClassDescriptionCollection<T>Collection of elements.Entry<K,
V> Map entry.List element with its corresponding index.Factory methods for iterators.List<T>Sequence of elements numbered by integer indices.ListMultimap<K,V> Mapping of keys to lists of values.ListMultimap.Builder<K,V> Builder of immutable list multimaps.Map<K,V> Mapping of keys to values.Map.Builder<K,V> Builder of immutable maps.Multimap<K,V, C extends Collection<V>> Common superclass for maps and multimaps.MultimapMutator<K,V, C extends Collection<V>> Common mutating methods for all mutable multimaps.Common methods ofMutableListandMutableSet.MutableList<T>List that can be mutated.MutableListMultimap<K,V> Mutable mapping of keys to lists of values.MutableMap<K,V> Map that can be mutated.MutableSet<T>Set that can be mutated.MutableSetMultimap<K,V> Mutable mapping of keys to sets of values.Set<T>A collection of distinct elements.SetMultimap<K,V> SetMultimap.Builder<K,V> Builder of immutable list multimaps.Traversable<T>Collection of elements that may be traversed in sequence.