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

public final Class UnifiedSetWithHashingStrategyMultimap<K, V>

extends AbstractMutableSetMultimap<K, V>
implements Externalizable
Class Inheritance
All Implemented Interfaces
java.io.Externalizable, java.io.Serializable
Imports
java.io.Externalizable, .IOException, .ObjectInput, .ObjectOutput, org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.block.HashingStrategy, 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.multimap.set.AbstractMutableSetMultimap, org.eclipse.collections.impl.set.strategy.mutable.UnifiedSetWithHashingStrategy, org.eclipse.collections.impl.utility.Iterate

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
UnifiedSetWithHashingStrategyMultimap()
Deprecated Empty default constructor used for serialization. Instantiating an UnifiedSetWithHashingStrategyMultimap with this constructor will have a null hashingStrategy and throw NullPointerException when used.

public
public
public
UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Multimap<? extends K, ? extends V> multimap)

public
UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Pair<K, V>... pairs)

public
UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Iterable<Pair<K, V>> inputIterable)

Method Summary

Modifier and TypeMethod and Description
protected UnifiedSetWithHashingStrategy<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 HashingStrategy<? super V>
public UnifiedSetWithHashingStrategyMultimap<K, V>
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V>
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V>
newMultimap(HashingStrategy<? super V> hashingStrategy, Multimap<? extends K, ? extends V> multimap)

public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V>
newMultimap(HashingStrategy<? super V> hashingStrategy)

public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V>
newMultimap(HashingStrategy<? super V> hashingStrategy, Pair<K, V>... pairs)

public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V>
newMultimap(HashingStrategy<? super V> hashingStrategy, Iterable<Pair<K, V>> inputIterable)

public void
readExternal(ObjectInput in)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.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 UnifiedSetWithHashingStrategyMultimap<K, V>
public UnifiedSetWithHashingStrategyMultimap<K, V>
public UnifiedSetWithHashingStrategyMultimap<K, V>
public UnifiedSetWithHashingStrategyMultimap<K, V>
public void
writeExternal(ObjectOutput out)

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.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.set.AbstractMutableSetMultimap:
asSynchronizedcollectKeyMultiValuescollectKeysValuescollectValuesforEachKeyMutableSettoImmutabletoMutable

Field Detail

hashingStrategyback to summary
private HashingStrategy<? super V> hashingStrategy
serialVersionUIDback to summary
private static final long serialVersionUID

Constructor Detail

UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap()

Deprecated

Empty default constructor used for serialization. Instantiating an UnifiedSetWithHashingStrategyMultimap with this constructor will have a null hashingStrategy and throw NullPointerException when used.

Annotations
@SuppressWarnings:UnusedDeclaration
@Deprecated
UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy)
UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap(UnifiedSetWithHashingStrategyMultimap<K, V> multimap)
UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Multimap<? extends K, ? extends V> multimap)
UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Pair<K, V>... pairs)
UnifiedSetWithHashingStrategyMultimapback to summary
public UnifiedSetWithHashingStrategyMultimap(HashingStrategy<? super V> hashingStrategy, Iterable<Pair<K, V>> inputIterable)

Method Detail

createCollectionback to summary
protected UnifiedSetWithHashingStrategy<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
getValueHashingStrategyback to summary
public HashingStrategy<? super V> getValueHashingStrategy()
newEmptyback to summary
public UnifiedSetWithHashingStrategyMultimap<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> UnifiedSetWithHashingStrategyMultimap<K, V> newMultimap(UnifiedSetWithHashingStrategyMultimap<K, V> multimap)
newMultimapback to summary
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V> newMultimap(HashingStrategy<? super V> hashingStrategy, Multimap<? extends K, ? extends V> multimap)
newMultimapback to summary
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V> newMultimap(HashingStrategy<? super V> hashingStrategy)
newMultimapback to summary
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V> newMultimap(HashingStrategy<? super V> hashingStrategy, Pair<K, V>... pairs)
newMultimapback to summary
public static <K, V> UnifiedSetWithHashingStrategyMultimap<K, V> newMultimap(HashingStrategy<? super V> hashingStrategy, Iterable<Pair<K, V>> inputIterable)
readExternalback to summary
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.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.
rejectKeysMultiValuesback to summary
public UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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 UnifiedSetWithHashingStrategyMultimap<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
writeExternalback to summary
public void writeExternal(ObjectOutput out) throws IOException

Overrides org.eclipse.collections.impl.multimap.AbstractMutableMultimap.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