Top Methods
org.eclipse.collections.api.multimap.bag

public Interface ImmutableBagIterableMultimap<K, V>

extends ImmutableMultimap<K, V>, BagMultimap<K, V>
Known Direct Subinterfaces
org.eclipse.collections.api.multimap.bag.ImmutableBagMultimap, org.eclipse.collections.api.multimap.sortedbag.ImmutableSortedBagMultimap
Imports
org.eclipse.collections.api.RichIterable, org.eclipse.collections.api.bag.ImmutableBagIterable, org.eclipse.collections.api.block.function.Function, .Function2, org.eclipse.collections.api.block.predicate.Predicate2, org.eclipse.collections.api.multimap.ImmutableMultimap, org.eclipse.collections.api.tuple.Pair

Since
6.0

Method Summary

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

Redeclares 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> ImmutableBagIterableMultimap<K2, V2>
collectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function)

Redeclares 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> ImmutableMultimap<K, V2>
collectValues(Function<? super V, ? extends V2> function)

Redeclares 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 ImmutableBagIterableMultimap<V, K>
flip()

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.flip, org.eclipse.collections.api.multimap.bag.BagMultimap.flip.

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

public ImmutableBagIterable<V>
get(K key)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.get, org.eclipse.collections.api.multimap.bag.BagMultimap.get.

Returns a view of all values associated with the given key.

public ImmutableBagIterableMultimap<K, V>
newEmpty()

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.newEmpty, org.eclipse.collections.api.multimap.bag.BagMultimap.newEmpty.

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

public ImmutableBagIterableMultimap<K, V>
public ImmutableBagIterableMultimap<K, V>
public ImmutableBagIterableMultimap<K, V>
public ImmutableBagIterableMultimap<K, V>
public ImmutableBagIterableMultimap<K, V>
rejectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysMultiValues, org.eclipse.collections.api.multimap.bag.BagMultimap.rejectKeysMultiValues.

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

public ImmutableBagIterableMultimap<K, V>
rejectKeysValues(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysValues, org.eclipse.collections.api.multimap.bag.BagMultimap.rejectKeysValues.

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

public ImmutableBagIterableMultimap<K, V>
public ImmutableBagIterableMultimap<K, V>
selectKeysValues(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.selectKeysValues, org.eclipse.collections.api.multimap.bag.BagMultimap.selectKeysValues.

Returns all elements of the source multimap that satisfies the predicate.

Method Detail

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

Redeclares 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> ImmutableBagIterableMultimap<K2, V2> collectKeysValues(Function2<? super K, ? super V, Pair<K2, V2>> function)

Redeclares 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> ImmutableMultimap<K, V2> collectValues(Function<? super V, ? extends V2> function)

Redeclares 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
flipback to summary
public ImmutableBagIterableMultimap<V, K> flip()

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.flip, org.eclipse.collections.api.multimap.bag.BagMultimap.flip.

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

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

Annotations
@Override
getback to summary
public ImmutableBagIterable<V> get(K key)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.get, org.eclipse.collections.api.multimap.bag.BagMultimap.get.

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

Returns a view of all values associated with the given key.

If the given key does not exist, an empty RichIterable is returned.

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

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.newEmpty, org.eclipse.collections.api.multimap.bag.BagMultimap.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 ImmutableBagIterableMultimap<K, V> newWith(K key, V value)

Redeclares as abstract: org.eclipse.collections.api.multimap.ImmutableMultimap.newWith.

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

Redeclares as abstract: org.eclipse.collections.api.multimap.ImmutableMultimap.newWithAll.

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

Redeclares as abstract: org.eclipse.collections.api.multimap.ImmutableMultimap.newWithout.

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

Redeclares as abstract: org.eclipse.collections.api.multimap.ImmutableMultimap.newWithoutAll.

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

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysMultiValues, org.eclipse.collections.api.multimap.bag.BagMultimap.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 ImmutableBagIterableMultimap<K, V> rejectKeysValues(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.rejectKeysValues, org.eclipse.collections.api.multimap.bag.BagMultimap.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 ImmutableBagIterableMultimap<K, V> selectKeysMultiValues(Predicate2<? super K, ? super RichIterable<V>> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.selectKeysMultiValues, org.eclipse.collections.api.multimap.bag.BagMultimap.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 ImmutableBagIterableMultimap<K, V> selectKeysValues(Predicate2<? super K, ? super V> predicate)

Redeclares org.eclipse.collections.api.multimap.ImmutableMultimap.selectKeysValues, org.eclipse.collections.api.multimap.bag.BagMultimap.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