Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.multimap.set.sorted

public final Class ImmutableSortedSetMultimapImpl<K, V>

extends AbstractImmutableMultimap<K, V, ImmutableSortedSet<V>>
implements ImmutableSortedSetMultimap<K, V>, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap, org.eclipse.collections.api.multimap.set.ImmutableSetIterableMultimap, org.eclipse.collections.api.multimap.ImmutableMultimap, org.eclipse.collections.api.multimap.Multimap, org.eclipse.collections.api.multimap.set.SetMultimap, org.eclipse.collections.api.multimap.sortedset.SortedSetMultimap, org.eclipse.collections.api.multimap.ordered.ReversibleIterableMultimap, org.eclipse.collections.api.multimap.ordered.OrderedIterableMultimap, org.eclipse.collections.api.multimap.ordered.SortedIterableMultimap
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, .Serializable, java.util.Comparator, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.predicate.Predicate2, org.eclipse.collections.api.factory.Maps, .SortedSets, org.eclipse.collections.api.map.ImmutableMap, .MutableMap, org.eclipse.collections.api.multimap.bag.ImmutableBagMultimap, .MutableBagMultimap, org.eclipse.collections.api.multimap.list.ImmutableListMultimap, org.eclipse.collections.api.multimap.set.ImmutableSetMultimap, org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap, .MutableSortedSetMultimap, org.eclipse.collections.api.set.sorted.ImmutableSortedSet, .MutableSortedSet, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.multimap.AbstractImmutableMultimap, .AbstractMutableMultimap, .ImmutableMultimapSerializationProxy, org.eclipse.collections.impl.multimap.bag.HashBagMultimap, org.eclipse.collections.impl.multimap.list.FastListMultimap, org.eclipse.collections.impl.utility.Iterate

The default ImmutableSortedSetMultimap implementation.
Since
1.0

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Comparator<? super V>
private static final long
Inherited from org.eclipse.collections.impl.multimap.AbstractImmutableMultimap:
map

Constructor Summary

AccessConstructor and Description
pack-priv
public
pack-priv
public

Method Summary

Modifier and TypeMethod and Description
public <K2, V2> ImmutableBagMultimap<K2, V2>
collectKeyMultiValues(Function<? super K, ? extends K2> keyFunction, Function<? super V, ? extends V2> valueFunction)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectKeyMultiValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectKeyMultiValues, org.eclipse.collections.api.multimap.Multimap.collectKeyMultiValues.

Returns a new multimap with the results of applying the specified keyFunction and valueFunction on each key and corresponding values of the source multimap.

public <K2, V2> ImmutableBagMultimap<K2, V2>
collectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectKeysValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectKeysValues, org.eclipse.collections.api.multimap.Multimap.collectKeysValues.

Returns a new multimap with the results of applying the specified function on each key and value of the source multimap.

public <V2> ImmutableListMultimap<K, V2>
collectValues(Function<? super V, ? extends V2> function)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectValues, org.eclipse.collections.api.multimap.Multimap.collectValues.

Returns a new multimap with the results of applying the specified function on each value of the source multimap.

public Comparator<? super V>
protected ImmutableSortedSet<V>
createCollection()

Implements abstract org.eclipse.collections.impl.multimap.AbstractMultimap.createCollection.

Creates the collection of values for a single key.

public ImmutableSetMultimap<V, K>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public ImmutableSortedSetMultimap<K, V>
public MutableSortedSetMultimap<K, V>
private Object
Inherited from org.eclipse.collections.impl.multimap.AbstractImmutableMultimap:
getgetMapisEmptykeySetreadResolvesizesizeDistincttoMaptoMap

Field Detail

comparatorback to summary
private final Comparator<? super V> comparator
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

ImmutableSortedSetMultimapImplback to summary
pack-priv ImmutableSortedSetMultimapImpl(MutableMap<K, ImmutableSortedSet<V>> map)
ImmutableSortedSetMultimapImplback to summary
public ImmutableSortedSetMultimapImpl(MutableMap<K, ImmutableSortedSet<V>> map, Comparator<? super V> comparator)
ImmutableSortedSetMultimapImplback to summary
pack-priv ImmutableSortedSetMultimapImpl(ImmutableMap<K, ImmutableSortedSet<V>> map)
ImmutableSortedSetMultimapImplback to summary
public ImmutableSortedSetMultimapImpl(ImmutableMap<K, ImmutableSortedSet<V>> map, Comparator<? super V> comparator)

Method Detail

collectKeyMultiValuesback to summary
public <K2, V2> ImmutableBagMultimap<K2, V2> collectKeyMultiValues(Function<? super K, ? extends K2> keyFunction, Function<? super V, ? extends V2> valueFunction)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectKeyMultiValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectKeyMultiValues, org.eclipse.collections.api.multimap.Multimap.collectKeyMultiValues.

Doc from org.eclipse.collections.api.multimap.Multimap.collectKeyMultiValues.

Returns a new multimap with the results of applying the specified keyFunction and valueFunction on each key and corresponding values of the source multimap. This method is also commonly called transform or map.

e.g.
return multimap.collectKeyMultiValues(each -> each + 1, Person::getLastName);
Annotations
@Override
collectKeysValuesback to summary
public <K2, V2> ImmutableBagMultimap<K2, V2> collectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectKeysValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectKeysValues, org.eclipse.collections.api.multimap.Multimap.collectKeysValues.

Doc from org.eclipse.collections.api.multimap.Multimap.collectKeysValues.

Returns a new multimap with the results of applying the specified function on each key and value of the source multimap. This method is also commonly called transform or map.

e.g.
return multimap.collectKeysValues(new Function2<Integer, Person, Pair<String, String>>()
{
    public Pair<String, String> valueOf(Integer age, Person person)
    {
        return Tuples.pair(age.toString(), person.getLastName());
    }
});
Annotations
@Override
collectValuesback to summary
public <V2> ImmutableListMultimap<K, V2> collectValues(Function<? super V, ? extends V2> function)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.collectValues, org.eclipse.collections.api.multimap.ImmutableMultimap.collectValues, org.eclipse.collections.api.multimap.Multimap.collectValues.

Doc from org.eclipse.collections.api.multimap.Multimap.collectValues.

Returns a new multimap with the results of applying the specified function on each value of the source multimap. This method is also commonly called transform or map.

e.g.
return multimap.collectValues(new Function<Person, String>()
{
    public String valueOf(Person person)
    {
        return person.getLastName();
    }
});
Annotations
@Override
comparatorback to summary
public Comparator<? super V> comparator()

Implements org.eclipse.collections.api.multimap.ordered.SortedIterableMultimap.comparator.

Annotations
@Override
createCollectionback to summary
protected ImmutableSortedSet<V> createCollection()

Implements abstract org.eclipse.collections.impl.multimap.AbstractMultimap.createCollection.

Doc from org.eclipse.collections.impl.multimap.AbstractMultimap.createCollection.

Creates the collection of values for a single key.

Collections with weak, soft, or phantom references are not supported. Each call to createCollection should create a new instance.

The returned collection class determines whether duplicate key-value pairs are allowed.

Annotations
@Override
flipback to summary
public ImmutableSetMultimap<V, K> flip()

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.flip, org.eclipse.collections.api.multimap.ImmutableMultimap.flip, org.eclipse.collections.api.multimap.Multimap.flip.

Doc from org.eclipse.collections.api.multimap.Multimap.flip.

Given a Multimap from Domain -> Range return a multimap from Range -> Domain.

Annotations
@Override
newEmptyback to summary
public ImmutableSortedSetMultimap<K, V> newEmpty()

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.newEmpty, org.eclipse.collections.api.multimap.ImmutableMultimap.newEmpty, org.eclipse.collections.api.multimap.Multimap.newEmpty.

Doc from org.eclipse.collections.api.multimap.Multimap.newEmpty.

Creates a new instance of the same implementation type, using the default capacity and growth parameters.

Annotations
@Override
newWithback to summary
public ImmutableSortedSetMultimap<K, V> newWith(K key, V value)

Overrides default org.eclipse.collections.api.multimap.ImmutableMultimap.newWith.

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.newWith.

Annotations
@Override
newWithAllback to summary
public ImmutableSortedSetMultimap<K, V> newWithAll(K key, Iterable<? extends V> values)

Overrides default org.eclipse.collections.api.multimap.ImmutableMultimap.newWithAll.

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.newWithAll.

Annotations
@Override
newWithoutback to summary
public ImmutableSortedSetMultimap<K, V> newWithout(Object key, Object value)

Overrides default org.eclipse.collections.api.multimap.ImmutableMultimap.newWithout.

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.newWithout.

Annotations
@Override
newWithoutAllback to summary
public ImmutableSortedSetMultimap<K, V> newWithoutAll(Object key)

Overrides default org.eclipse.collections.api.multimap.ImmutableMultimap.newWithoutAll.

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.newWithoutAll.

Annotations
@Override
rejectKeysMultiValuesback to summary
public ImmutableSortedSetMultimap<K, V> rejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.rejectKeysMultiValues, org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysMultiValues, org.eclipse.collections.api.multimap.Multimap.rejectKeysMultiValues.

Doc from org.eclipse.collections.api.multimap.Multimap.rejectKeysMultiValues.

Returns all elements of the source multimap that don't satisfy the predicate.

e.g.
return multimap.rejectKeysMultiValues(new Predicate2<Integer, Iterable<Person>>()
{
    public boolean accept(Integer age, Iterable<Person> values)
    {
        return (age >= 18)
                 && ((RichIterable<Person>)values.size() >= 2);
    }
});
Annotations
@Override
rejectKeysValuesback to summary
public ImmutableSortedSetMultimap<K, V> rejectKeysValues(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.rejectKeysValues, org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysValues, org.eclipse.collections.api.multimap.Multimap.rejectKeysValues.

Doc from org.eclipse.collections.api.multimap.Multimap.rejectKeysValues.

Returns all elements of the source multimap that don't satisfy the predicate.

e.g.
return multimap.rejectKeysValues(new Predicate2<Integer, Person>()
{
    public boolean accept(Integer age, Person person)
    {
        return (age >= 18)
                 && (person.getAddress().getCity().equals("Metuchen"));
    }
});
Annotations
@Override
selectKeysMultiValuesback to summary
public ImmutableSortedSetMultimap<K, V> selectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.selectKeysMultiValues, org.eclipse.collections.api.multimap.ImmutableMultimap.selectKeysMultiValues, org.eclipse.collections.api.multimap.Multimap.selectKeysMultiValues.

Doc from org.eclipse.collections.api.multimap.Multimap.selectKeysMultiValues.

Returns all elements of the source multimap that satisfies the predicate. This method is also commonly called filter.

e.g.
return multimap.selectKeysMultiValues(new Predicate2<Integer, Iterable<Person>>()
{
    public boolean accept(Integer age, Iterable<Person> values)
    {
        return (age >= 18)
                 && ((RichIterable<Person>)values.size() >= 2);
    }
});
Annotations
@Override
selectKeysValuesback to summary
public ImmutableSortedSetMultimap<K, V> selectKeysValues(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.multimap.sortedset.ImmutableSortedSetMultimap.selectKeysValues, org.eclipse.collections.api.multimap.ImmutableMultimap.selectKeysValues, org.eclipse.collections.api.multimap.Multimap.selectKeysValues.

Doc from org.eclipse.collections.api.multimap.Multimap.selectKeysValues.

Returns all elements of the source multimap that satisfies the predicate. This method is also commonly called filter.

e.g.
return multimap.selectKeysValues(new Predicate2<Integer, Person>()
{
    public boolean accept(Integer age, Person person)
    {
        return (age >= 18)
                 && (person.getAddress().getCity().equals("Metuchen"));
    }
});
Annotations
@Override
toImmutableback to summary
public ImmutableSortedSetMultimap<K, V> toImmutable()

Overrides org.eclipse.collections.impl.multimap.AbstractImmutableMultimap.toImmutable.

Implements org.eclipse.collections.api.multimap.sortedset.SortedSetMultimap.toImmutable, org.eclipse.collections.api.multimap.Multimap.toImmutable.

Doc from org.eclipse.collections.api.multimap.Multimap.toImmutable.

Returns an immutable copy of this Multimap if it is not already immutable. If the Multimap is immutable, it will return itself.

The returned Multimap will be Serializable if this Multimap is Serializable.

Annotations
@Override
toMutableback to summary
public MutableSortedSetMultimap<K, V> toMutable()

Implements org.eclipse.collections.api.multimap.sortedset.SortedSetMultimap.toMutable, org.eclipse.collections.api.multimap.Multimap.toMutable.

Doc from org.eclipse.collections.api.multimap.Multimap.toMutable.

Returns a mutable copy of this Multimap.

Annotations
@Override
writeReplaceback to summary
private Object writeReplace()
org.eclipse.collections.impl.multimap.set.sorted back to summary

private final Class ImmutableSortedSetMultimapImpl.ImmutableSortedSetMultimapSerializationProxy<K, V>

extends ImmutableMultimapSerializationProxy<K, V, ImmutableSortedSet<V>>
implements Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable

Field Summary

Modifier and TypeField and Description
private Comparator<? super V>
private static final long

Constructor Summary

AccessConstructor and Description
public
private

Method Summary

Modifier and TypeMethod and Description
protected AbstractMutableMultimap<K, V, MutableSortedSet<V>>
public void
readExternal(ObjectInput in)

Overrides org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy.readExternal.

Implements java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays.

public void
writeExternal(ObjectOutput out)

Overrides org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy.writeExternal.

Implements java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Inherited from org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy:
readResolve

Field Detail

comparatorback to summary
private Comparator<? super V> comparator
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

ImmutableSortedSetMultimapSerializationProxyback to summary
public ImmutableSortedSetMultimapSerializationProxy()
ImmutableSortedSetMultimapSerializationProxyback to summary
private ImmutableSortedSetMultimapSerializationProxy(ImmutableMap<K, ImmutableSortedSet<V>> map, Comparator<? super V> comparator)

Method Detail

createEmptyMutableMultimapback to summary
protected AbstractMutableMultimap<K, V, MutableSortedSet<V>> createEmptyMutableMultimap()

Implements abstract org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy.createEmptyMutableMultimap.

Annotations
@Override
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Overrides org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy.readExternal.

Implements java.io.Externalizable.readExternal.

Doc from java.io.Externalizable.readExternal.

The object implements the readExternal method to restore its contents by calling the methods of DataInput for primitive types and readObject for objects, strings and arrays. The readExternal method must read the values in the same sequence and with the same types as were written by writeExternal.

Annotations
@Override
Exceptions
IOException:
if I/O errors occur
ClassNotFoundException:
If the class for an object being restored cannot be found.
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Overrides org.eclipse.collections.impl.multimap.ImmutableMultimapSerializationProxy.writeExternal.

Implements java.io.Externalizable.writeExternal.

Doc from java.io.Externalizable.writeExternal.

The object implements the writeExternal method to save its contents by calling the methods of DataOutput for its primitive values or calling the writeObject method of ObjectOutput for objects, strings, and arrays.

Annotations
@Override
Exceptions
IOException:
Includes any I/O exceptions that may occur