Serializable, IntIterable, IntValuesMap, LongIntMap, MutableIntValuesMap, MutableLongIntMap, PrimitiveIterablepublic class UnmodifiableLongIntMap extends Object implements MutableLongIntMap, Serializable
| Constructor | Description |
|---|---|
UnmodifiableLongIntMap(MutableLongIntMap map) |
| Modifier and Type | Method | Description |
|---|---|---|
int |
addToValue(long key,
int toBeAdded) |
|
boolean |
allSatisfy(IntPredicate predicate) |
Returns true if all of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
anySatisfy(IntPredicate predicate) |
Returns true if any of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
void |
appendString(Appendable appendable) |
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String separator) |
Prints a string representation of this collection onto the given
Appendable. |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
Prints a string representation of this collection onto the given
Appendable. |
LazyIntIterable |
asLazy() |
Returns a LazyIntIterable adapter wrapping the source IntIterable.
|
MutableLongIntMap |
asSynchronized() |
|
MutableLongIntMap |
asUnmodifiable() |
|
double |
average() |
|
RichIterable<IntIterable> |
chunk(int size) |
Partitions elements in fixed size chunks.
|
void |
clear() |
|
<V> MutableBag<V> |
collect(IntToObjectFunction<? extends V> function) |
Returns a new collection with the results of applying the specified function on each element of the source
collection.
|
boolean |
contains(int value) |
Returns true if the value is contained in the IntIterable, and false if it is not.
|
boolean |
containsAll(int... source) |
Returns true if the all of the values specified in the source array are contained
in the IntIterable, and false if they are not.
|
boolean |
containsAll(IntIterable source) |
Returns true if the all of the values specified in the source IntIterable are contained
in the IntIterable, and false if they are not.
|
boolean |
containsKey(long key) |
|
boolean |
containsValue(int value) |
|
int |
count(IntPredicate predicate) |
Returns a count of the number of elements in the IntIterable that return true for the
specified predicate.
|
int |
detectIfNone(IntPredicate predicate,
int ifNone) |
|
void |
each(IntProcedure procedure) |
A synonym for forEach.
|
boolean |
equals(Object otherMap) |
Follows the same general contract as
Map.equals(Object). |
MutableIntLongMap |
flipUniqueValues() |
Return the IntLongMap that is obtained by flipping the direction of this map and making the associations
from value to key.
|
void |
forEach(IntProcedure procedure) |
Applies the IntProcedure to each element in the IntIterable.
|
void |
forEachKey(LongProcedure procedure) |
|
void |
forEachKeyValue(LongIntProcedure procedure) |
|
void |
forEachValue(IntProcedure procedure) |
|
int |
get(long key) |
|
int |
getIfAbsent(long key,
int ifAbsent) |
|
int |
getIfAbsentPut(long key,
int value) |
|
int |
getIfAbsentPut(long key,
IntFunction0 function) |
|
<P> int |
getIfAbsentPutWith(long key,
IntFunction<? super P> function,
P parameter) |
|
int |
getIfAbsentPutWithKey(long key,
LongToIntFunction function) |
|
int |
getOrThrow(long key) |
|
int |
hashCode() |
Follows the same general contract as
Map.hashCode(). |
<T> T |
injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function) |
|
MutableIntIterator |
intIterator() |
Returns a primitive iterator that can be used to iterate over the IntIterable in an
imperative style.
|
boolean |
isEmpty() |
Returns true if this iterable has zero items.
|
MutableLongSet |
keySet() |
|
LazyLongIterable |
keysView() |
|
RichIterable<LongIntPair> |
keyValuesView() |
|
String |
makeString() |
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space). |
String |
makeString(String separator) |
Returns a string representation of this collection by delegating to
PrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String). |
String |
makeString(String start,
String separator,
String end) |
Returns a string representation of this collection with the elements separated by the specified
separator and enclosed between the start and end strings.
|
int |
max() |
|
int |
maxIfEmpty(int defaultValue) |
|
double |
median() |
|
int |
min() |
|
int |
minIfEmpty(int defaultValue) |
|
boolean |
noneSatisfy(IntPredicate predicate) |
Returns true if none of the elements in the IntIterable return true for the
specified predicate, otherwise returns false.
|
boolean |
notEmpty() |
The English equivalent of !this.isEmpty()
|
void |
put(long key,
int value) |
|
void |
putAll(LongIntMap map) |
|
void |
putPair(LongIntPair keyValuePair) |
This method allows MutableLongIntMap the ability to add an element in the form of LongIntPair.
|
MutableIntBag |
reject(IntPredicate predicate) |
Returns a new IntIterable with all of the elements in the IntIterable that
return false for the specified predicate.
|
MutableLongIntMap |
reject(LongIntPredicate predicate) |
|
void |
remove(long key) |
|
void |
removeKey(long key) |
|
int |
removeKeyIfAbsent(long key,
int value) |
|
MutableIntBag |
select(IntPredicate predicate) |
Returns a new IntIterable with all of the elements in the IntIterable that
return true for the specified predicate.
|
MutableLongIntMap |
select(LongIntPredicate predicate) |
|
int |
size() |
Returns the number of items in this iterable.
|
long |
sum() |
|
int[] |
toArray() |
Converts the IntIterable to a primitive int array.
|
MutableIntBag |
toBag() |
Converts the IntIterable to a new MutableIntBag.
|
ImmutableLongIntMap |
toImmutable() |
|
MutableIntList |
toList() |
Converts the IntIterable to a new MutableIntList.
|
MutableIntSet |
toSet() |
Converts the IntIterable to a new MutableIntSet.
|
int[] |
toSortedArray() |
|
MutableIntList |
toSortedList() |
|
String |
toString() |
Follows the same general contract as
AbstractMap.toString() |
int |
updateValue(long key,
int initialValueIfAbsent,
IntToIntFunction function) |
|
void |
updateValues(LongIntToIntFunction function) |
Updates the values in-place.
|
MutableIntCollection |
values() |
|
MutableLongIntMap |
withKeyValue(long key,
int value) |
|
MutableLongIntMap |
withoutAllKeys(LongIterable keys) |
|
MutableLongIntMap |
withoutKey(long key) |
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, flatCollect, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatisticstapwithAllKeyValuespublic UnmodifiableLongIntMap(MutableLongIntMap map)
public void clear()
clear in interface MutableIntValuesMappublic void put(long key,
int value)
put in interface MutableLongIntMappublic void putPair(LongIntPair keyValuePair)
MutableLongIntMapputPair in interface MutableLongIntMapMutableLongIntMap.put(long, int)public void putAll(LongIntMap map)
putAll in interface MutableLongIntMappublic void updateValues(LongIntToIntFunction function)
MutableLongIntMapupdateValues in interface MutableLongIntMapfunction - that takes a key and its value and that returns a new value for this keypublic void removeKey(long key)
removeKey in interface MutableLongIntMappublic void remove(long key)
remove in interface MutableLongIntMappublic int removeKeyIfAbsent(long key,
int value)
removeKeyIfAbsent in interface MutableLongIntMappublic int getIfAbsentPut(long key,
int value)
getIfAbsentPut in interface MutableLongIntMappublic int getIfAbsentPut(long key,
IntFunction0 function)
getIfAbsentPut in interface MutableLongIntMappublic int getIfAbsentPutWithKey(long key,
LongToIntFunction function)
getIfAbsentPutWithKey in interface MutableLongIntMappublic <P> int getIfAbsentPutWith(long key,
IntFunction<? super P> function,
P parameter)
getIfAbsentPutWith in interface MutableLongIntMappublic int updateValue(long key,
int initialValueIfAbsent,
IntToIntFunction function)
updateValue in interface MutableLongIntMappublic int get(long key)
get in interface LongIntMappublic int getIfAbsent(long key,
int ifAbsent)
getIfAbsent in interface LongIntMappublic int getOrThrow(long key)
getOrThrow in interface LongIntMappublic boolean containsKey(long key)
containsKey in interface LongIntMappublic boolean containsValue(int value)
containsValue in interface IntValuesMappublic void forEachValue(IntProcedure procedure)
forEachValue in interface IntValuesMappublic void forEachKey(LongProcedure procedure)
forEachKey in interface LongIntMappublic void forEachKeyValue(LongIntProcedure procedure)
forEachKeyValue in interface LongIntMappublic LazyLongIterable keysView()
keysView in interface LongIntMappublic RichIterable<LongIntPair> keyValuesView()
keyValuesView in interface LongIntMappublic MutableIntLongMap flipUniqueValues()
LongIntMapflipUniqueValues in interface LongIntMapflipUniqueValues in interface MutableLongIntMappublic MutableLongIntMap select(LongIntPredicate predicate)
select in interface LongIntMapselect in interface MutableLongIntMappublic MutableLongIntMap reject(LongIntPredicate predicate)
reject in interface LongIntMapreject in interface MutableLongIntMappublic MutableIntIterator intIterator()
IntIterableintIterator in interface IntIterableintIterator in interface MutableIntValuesMappublic void forEach(IntProcedure procedure)
IntIterableforEach in interface IntIterablepublic void each(IntProcedure procedure)
IntIterableeach in interface IntIterablepublic int count(IntPredicate predicate)
IntIterablecount in interface IntIterablepublic boolean anySatisfy(IntPredicate predicate)
IntIterableanySatisfy in interface IntIterablepublic boolean allSatisfy(IntPredicate predicate)
IntIterableallSatisfy in interface IntIterablepublic boolean noneSatisfy(IntPredicate predicate)
IntIterablenoneSatisfy in interface IntIterablepublic MutableIntBag select(IntPredicate predicate)
IntIterableselect in interface IntIterableselect in interface IntValuesMapselect in interface MutableIntValuesMappublic MutableIntBag reject(IntPredicate predicate)
IntIterablereject in interface IntIterablereject in interface IntValuesMapreject in interface MutableIntValuesMappublic <V> MutableBag<V> collect(IntToObjectFunction<? extends V> function)
IntIterablecollect in interface IntIterablecollect in interface IntValuesMapcollect in interface MutableIntValuesMappublic int detectIfNone(IntPredicate predicate, int ifNone)
detectIfNone in interface IntIterablepublic long sum()
sum in interface IntIterablepublic int max()
max in interface IntIterablepublic int maxIfEmpty(int defaultValue)
maxIfEmpty in interface IntIterablepublic int min()
min in interface IntIterablepublic int minIfEmpty(int defaultValue)
minIfEmpty in interface IntIterablepublic double average()
average in interface IntIterablepublic double median()
median in interface IntIterablepublic int addToValue(long key,
int toBeAdded)
addToValue in interface MutableLongIntMappublic int[] toSortedArray()
toSortedArray in interface IntIterablepublic MutableIntList toSortedList()
toSortedList in interface IntIterablepublic int[] toArray()
IntIterabletoArray in interface IntIterablepublic boolean contains(int value)
IntIterablecontains in interface IntIterablepublic boolean containsAll(int... source)
IntIterablecontainsAll in interface IntIterablepublic boolean containsAll(IntIterable source)
IntIterablecontainsAll in interface IntIterablepublic MutableIntList toList()
IntIterabletoList in interface IntIterablepublic MutableIntSet toSet()
IntIterabletoSet in interface IntIterablepublic MutableIntBag toBag()
IntIterabletoBag in interface IntIterablepublic LazyIntIterable asLazy()
IntIterableasLazy in interface IntIterablepublic MutableLongIntMap withKeyValue(long key, int value)
withKeyValue in interface MutableLongIntMappublic MutableLongIntMap withoutKey(long key)
withoutKey in interface MutableLongIntMappublic MutableLongIntMap withoutAllKeys(LongIterable keys)
withoutAllKeys in interface MutableLongIntMappublic MutableLongIntMap asUnmodifiable()
asUnmodifiable in interface MutableLongIntMappublic MutableLongIntMap asSynchronized()
asSynchronized in interface MutableLongIntMappublic ImmutableLongIntMap toImmutable()
toImmutable in interface LongIntMappublic int size()
PrimitiveIterablesize in interface PrimitiveIterablepublic boolean isEmpty()
PrimitiveIterableisEmpty in interface PrimitiveIterablepublic boolean notEmpty()
PrimitiveIterablenotEmpty in interface PrimitiveIterablepublic MutableLongSet keySet()
keySet in interface LongIntMappublic MutableIntCollection values()
values in interface IntValuesMappublic boolean equals(Object otherMap)
LongIntMapMap.equals(Object).equals in interface LongIntMapequals in class Objectpublic int hashCode()
LongIntMapMap.hashCode().hashCode in interface LongIntMaphashCode in class Objectpublic String toString()
LongIntMapAbstractMap.toString()toString in interface LongIntMaptoString in interface PrimitiveIterabletoString in class ObjectAbstractCollection.toString()public String makeString()
PrimitiveIterablePrimitiveIterable.makeString(String) and defaulting
the separator parameter to the characters ", " (comma and space).makeString in interface PrimitiveIterablepublic String makeString(String separator)
PrimitiveIterablePrimitiveIterable.makeString(String, String, String)
and defaulting the start and end parameters to "" (the empty String).makeString in interface PrimitiveIterablepublic String makeString(String start, String separator, String end)
PrimitiveIterablemakeString in interface PrimitiveIterablepublic void appendString(Appendable appendable)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString().appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String).appendString in interface PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
PrimitiveIterableAppendable. Prints the string returned
by PrimitiveIterable.makeString(String, String, String).appendString in interface PrimitiveIterablepublic <T> T injectInto(T injectedValue,
ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface IntIterablepublic RichIterable<IntIterable> chunk(int size)
IntIterablechunk in interface IntIterablesize - the number of elements per chunkRichIterable containing IntIterables of size size, except the last will be
truncated if the elements don't divide evenly.Copyright © 2004–2019. All rights reserved.