Top Fields Constructors Methods
org.eclipse.collections.impl.multimap.set

public final Class UnifiedSetMultimap<K, V>

extends AbstractMutableSetMultimap<K, V>
implements Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable
Imports
java.io.Externalizable, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.block.predicate.Predicate2, org.eclipse.collections.api.factory.Maps, org.eclipse.collections.api.map.MutableMap, org.eclipse.collections.api.multimap.Multimap, org.eclipse.collections.api.multimap.set.MutableSetMultimap, org.eclipse.collections.api.set.MutableSet, org.eclipse.collections.api.tuple.Pair, org.eclipse.collections.impl.map.mutable.UnifiedMap, org.eclipse.collections.impl.set.mutable.UnifiedSet, org.eclipse.collections.impl.utility.Iterate

Field Summary

Modifier and TypeField and Description
private static final long

Constructor Summary

AccessConstructor and Description
public
public
UnifiedSetMultimap(Multimap<? extends K, ? extends V> multimap)

public
UnifiedSetMultimap(Pair<K, V>... pairs)

public
UnifiedSetMultimap(Iterable<Pair<K, V>> inputIterable)

Method Summary

Modifier and TypeMethod and Description
protected MutableSet<V>
createCollection()

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

Creates the collection of values for a single key.

protected MutableMap<K, MutableSet<V>>
protected MutableMap<K, MutableSet<V>>
public MutableSetMultimap<V, K>
public UnifiedSetMultimap<K, V>
public static <K, V> UnifiedSetMultimap<K, V>
newMultimap(Multimap<? extends K, ? extends V> multimap)

public static <K, V> UnifiedSetMultimap<K, V>
public static <K, V> UnifiedSetMultimap<K, V>
newMultimap(Pair<K, V>... pairs)

public static <K, V> UnifiedSetMultimap<K, V>
newMultimap(Iterable<Pair<K, V>> inputIterable)

public UnifiedSetMultimap<K, V>
public UnifiedSetMultimap<K, V>
public UnifiedSetMultimap<K, V>
public UnifiedSetMultimap<K, V>
Inherited from org.eclipse.collections.impl.multimap.set.AbstractMutableSetMultimap:
asSynchronizedcollectKeyMultiValuescollectKeysValuescollectValuesforEachKeyMutableSettoImmutabletoMutable

Field Detail

serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

UnifiedSetMultimapback to summary
public UnifiedSetMultimap()
UnifiedSetMultimapback to summary
public UnifiedSetMultimap(Multimap<? extends K, ? extends V> multimap)
UnifiedSetMultimapback to summary
public UnifiedSetMultimap(Pair<K, V>... pairs)
UnifiedSetMultimapback to summary
public UnifiedSetMultimap(Iterable<Pair<K, V>> inputIterable)

Method Detail

createCollectionback to summary
protected MutableSet<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
createMapback to summary
protected MutableMap<K, MutableSet<V>> createMap()

Implements abstract org.eclipse.collections.impl.multimap.AbstractMutableMultimap.createMap.

Annotations
@Override
createMapWithKeyCountback to summary
protected MutableMap<K, MutableSet<V>> createMapWithKeyCount(int keyCount)

Implements abstract org.eclipse.collections.impl.multimap.AbstractMutableMultimap.createMapWithKeyCount.

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

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.flip, org.eclipse.collections.api.multimap.MutableMultimap.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 UnifiedSetMultimap<K, V> newEmpty()

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.newEmpty, org.eclipse.collections.api.multimap.MutableMultimap.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
newMultimapback to summary
public static <K, V> UnifiedSetMultimap<K, V> newMultimap(Multimap<? extends K, ? extends V> multimap)
newMultimapback to summary
public static <K, V> UnifiedSetMultimap<K, V> newMultimap()
newMultimapback to summary
public static <K, V> UnifiedSetMultimap<K, V> newMultimap(Pair<K, V>... pairs)
newMultimapback to summary
public static <K, V> UnifiedSetMultimap<K, V> newMultimap(Iterable<Pair<K, V>> inputIterable)
rejectKeysMultiValuesback to summary
public UnifiedSetMultimap<K, V> rejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.rejectKeysMultiValues, org.eclipse.collections.api.multimap.MutableMultimap.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 UnifiedSetMultimap<K, V> rejectKeysValues(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.rejectKeysValues, org.eclipse.collections.api.multimap.MutableMultimap.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 UnifiedSetMultimap<K, V> selectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.selectKeysMultiValues, org.eclipse.collections.api.multimap.MutableMultimap.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 UnifiedSetMultimap<K, V> selectKeysValues(Predicate2<? super K, ? super V> predicate)

Implements org.eclipse.collections.api.multimap.set.MutableSetMultimap.selectKeysValues, org.eclipse.collections.api.multimap.MutableMultimap.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