public interface ImmutableLongObjectMap<V> extends LongObjectMap<V>
Modifier and Type | Method and Description |
---|---|
<VV> ImmutableCollection<VV> |
collect(Function<? super V,? extends VV> function)
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
ImmutableBooleanCollection |
collectBoolean(BooleanFunction<? super V> booleanFunction)
Returns a new primitive
boolean iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableByteCollection |
collectByte(ByteFunction<? super V> byteFunction)
Returns a new primitive
byte iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableCharCollection |
collectChar(CharFunction<? super V> charFunction)
Returns a new primitive
char iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableDoubleCollection |
collectDouble(DoubleFunction<? super V> doubleFunction)
Returns a new primitive
double iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableFloatCollection |
collectFloat(FloatFunction<? super V> floatFunction)
Returns a new primitive
float iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableIntCollection |
collectInt(IntFunction<? super V> intFunction)
Returns a new primitive
int iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableLongCollection |
collectLong(LongFunction<? super V> longFunction)
Returns a new primitive
long iterable with the results of applying the specified function on each element
of the source collection. |
ImmutableShortCollection |
collectShort(ShortFunction<? super V> ShortFunction)
Returns a new primitive
short iterable with the results of applying the specified function on each element
of the source collection. |
<P,VV> ImmutableCollection<VV> |
collectWith(Function2<? super V,? super P,? extends VV> function,
P parameter)
Same as collect with a
Function2 and specified parameter which is passed to the block
|
ImmutableLongObjectMap<V> |
newWithKeyValue(long key,
V value) |
ImmutableLongObjectMap<V> |
newWithoutAllKeys(LongIterable keys) |
ImmutableLongObjectMap<V> |
newWithoutKey(long key) |
ImmutableLongObjectMap<V> |
reject(LongObjectPredicate<? super V> predicate) |
ImmutableCollection<V> |
reject(Predicate<? super V> predicate)
Returns all elements of the source collection that return false when evaluating of the predicate.
|
ImmutableLongObjectMap<V> |
select(LongObjectPredicate<? super V> predicate) |
ImmutableCollection<V> |
select(Predicate<? super V> predicate)
Returns all elements of the source collection that return true when evaluating the predicate.
|
<P> ImmutableCollection<V> |
selectWith(Predicate2<? super V,? super P> predicate,
P parameter)
Similar to
RichIterable.select(Predicate) , except with an evaluation parameter for the second generic argument in Predicate2 . |
containsKey, containsValue, equals, forEachKey, forEachKeyValue, forEachValue, get, getIfAbsent, hashCode, keySet, keysView, keyValuesView, toImmutable, toString, values
aggregateBy, aggregateInPlaceBy, allSatisfy, allSatisfyWith, anySatisfy, anySatisfyWith, appendString, appendString, appendString, asLazy, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectIf, collectIf, collectInt, collectLong, collectShort, collectWith, contains, containsAll, containsAllArguments, containsAllIterable, count, countWith, detect, detectIfNone, detectWith, detectWithIfNone, flatCollect, flatCollect, getFirst, getLast, groupBy, groupBy, groupByEach, groupByEach, groupByUniqueKey, injectInto, injectInto, injectInto, injectInto, injectInto, isEmpty, makeString, makeString, makeString, max, max, maxBy, min, min, minBy, noneSatisfy, noneSatisfyWith, notEmpty, partition, partitionWith, reject, rejectWith, rejectWith, select, selectInstancesOf, selectWith, size, sumOfDouble, sumOfFloat, sumOfInt, sumOfLong, toArray, toArray, toBag, toList, toMap, toSet, toSortedList, toSortedList, toSortedListBy, toSortedMap, toSortedMap, toSortedSet, toSortedSet, toSortedSetBy, zip, zip, zipWithIndex, zipWithIndex
forEach, forEachWith, forEachWithIndex
forEach, iterator, spliterator
ImmutableLongObjectMap<V> select(LongObjectPredicate<? super V> predicate)
select
in interface LongObjectMap<V>
ImmutableLongObjectMap<V> reject(LongObjectPredicate<? super V> predicate)
reject
in interface LongObjectMap<V>
ImmutableCollection<V> select(Predicate<? super V> predicate)
RichIterable
e.g. return people.select(new Predicate<Person>() { public boolean accept(Person person) { return person.getAddress().getCity().equals("Metuchen"); } });
select
in interface RichIterable<V>
<P> ImmutableCollection<V> selectWith(Predicate2<? super V,? super P> predicate, P parameter)
RichIterable
RichIterable.select(Predicate)
, except with an evaluation parameter for the second generic argument in Predicate2
.selectWith
in interface RichIterable<V>
predicate
- a Predicate2
to use as the select criteriaparameter
- a parameter to pass in for evaluation of the second argument P
in predicate
RichIterable.select(Predicate)
ImmutableCollection<V> reject(Predicate<? super V> predicate)
RichIterable
e.g. return people.reject(new Predicate<Person>() { public boolean accept(Person person) { return person.person.getLastName().equals("Smith"); } });
e.g. return people.reject(Predicates.attributeEqual("lastName", "Smith"));
reject
in interface RichIterable<V>
predicate
- a Predicate
to use as the reject criteriaPredicate.accept(Object)
method to evaluate to false<VV> ImmutableCollection<VV> collect(Function<? super V,? extends VV> function)
RichIterable
e.g. return people.collect(new Function<Person, String>() { public String valueOf(Person person) { return person.getFirstName() + " " + person.getLastName(); } });
collect
in interface RichIterable<V>
ImmutableBooleanCollection collectBoolean(BooleanFunction<? super V> booleanFunction)
RichIterable
boolean
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectBoolean(new BooleanFunction<Person>() { public boolean booleanValueOf(Person person) { return person.hasDrivingLicense(); } });
collectBoolean
in interface RichIterable<V>
ImmutableByteCollection collectByte(ByteFunction<? super V> byteFunction)
RichIterable
byte
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectByte(new ByteFunction<Person>() { public byte byteValueOf(Person person) { return person.getCode(); } });
collectByte
in interface RichIterable<V>
ImmutableCharCollection collectChar(CharFunction<? super V> charFunction)
RichIterable
char
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectChar(new CharFunction<Person>() { public char charValueOf(Person person) { return person.getMiddleInitial(); } });
collectChar
in interface RichIterable<V>
ImmutableDoubleCollection collectDouble(DoubleFunction<? super V> doubleFunction)
RichIterable
double
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectDouble(new DoubleFunction<Person>() { public double doubleValueOf(Person person) { return person.getMilesFromNorthPole(); } });
collectDouble
in interface RichIterable<V>
ImmutableFloatCollection collectFloat(FloatFunction<? super V> floatFunction)
RichIterable
float
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectFloat(new FloatFunction<Person>() { public float floatValueOf(Person person) { return person.getHeightInInches(); } });
collectFloat
in interface RichIterable<V>
ImmutableIntCollection collectInt(IntFunction<? super V> intFunction)
RichIterable
int
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectInt(new IntFunction<Person>() { public int intValueOf(Person person) { return person.getAge(); } });
collectInt
in interface RichIterable<V>
ImmutableLongCollection collectLong(LongFunction<? super V> longFunction)
RichIterable
long
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectLong(new LongFunction<Person>() { public long longValueOf(Person person) { return person.getGuid(); } });
collectLong
in interface RichIterable<V>
ImmutableShortCollection collectShort(ShortFunction<? super V> ShortFunction)
RichIterable
short
iterable with the results of applying the specified function on each element
of the source collection. This method is also commonly called transform or map.
e.g. return people.collectShort(new ShortFunction<Person>() { public short shortValueOf(Person person) { return person.getNumberOfJunkMailItemsReceivedPerMonth(); } });
collectShort
in interface RichIterable<V>
<P,VV> ImmutableCollection<VV> collectWith(Function2<? super V,? super P,? extends VV> function, P parameter)
RichIterable
Function2
and specified parameter which is passed to the block
e.g. Function2addParameterFunction = new Function2 () { public Integer value(final Integer each, final Integer parameter) { return each + parameter; } }; FastList.newListWith(1, 2, 3).collectWith(addParameterFunction, Integer.valueOf(1));
collectWith
in interface RichIterable<V>
function
- A Function2
to use as the collect transformation functionparameter
- A parameter to pass in for evaluation of the second argument P
in function
RichIterable
that contains the transformed elements returned by Function2.value(Object, Object)
RichIterable.collect(Function)
ImmutableLongObjectMap<V> newWithKeyValue(long key, V value)
ImmutableLongObjectMap<V> newWithoutKey(long key)
ImmutableLongObjectMap<V> newWithoutAllKeys(LongIterable keys)
Copyright © 2004–2017. All rights reserved.