Class AbstractMutableShortValuesMap
- java.lang.Object
-
- org.eclipse.collections.impl.primitive.AbstractShortIterable
-
- org.eclipse.collections.impl.map.mutable.primitive.AbstractMutableShortValuesMap
-
- All Implemented Interfaces:
MutableShortValuesMap,ShortValuesMap,PrimitiveIterable,ShortIterable
- Direct Known Subclasses:
ByteShortHashMap,CharShortHashMap,DoubleShortHashMap,FloatShortHashMap,IntShortHashMap,LongShortHashMap,ShortShortHashMap
public abstract class AbstractMutableShortValuesMap extends AbstractShortIterable implements MutableShortValuesMap
This file was automatically generated from template file abstractMutablePrimitiveValuesMap.stg.- Since:
- 6.0.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractMutableShortValuesMap.AbstractShortValuesCollectionprotected static classAbstractMutableShortValuesMap.SentinelValues
-
Constructor Summary
Constructors Constructor Description AbstractMutableShortValuesMap()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddEmptyKeyValue(short value)protected voidaddRemovedKeyValue(short value)booleanallSatisfy(ShortPredicate predicate)Returns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.booleananySatisfy(ShortPredicate predicate)Returns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.voidappendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)Prints a string representation of this collection onto the givenAppendable.RichIterable<ShortIterable>chunk(int size)Partitions elements in fixed size chunks.<V> MutableBag<V>collect(ShortToObjectFunction<? extends V> function)Returns a new collection with the results of applying the specified function on each element of the source collection.booleancontains(short value)Returns true if the value is contained in the ShortIterable, and false if it is not.booleancontainsAll(ShortIterable source)Returns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.booleancontainsValue(short value)Returns whether or not this map contains the value.intcount(ShortPredicate predicate)Returns a count of the number of elements in the ShortIterable that return true for the specified predicate.shortdetectIfNone(ShortPredicate predicate, short value)voideach(ShortProcedure procedure)A synonym for forEach.voidforEachValue(ShortProcedure procedure)Iterates through each value in this map.protected abstract shortgetEmptyValue()protected abstract intgetOccupiedWithData()protected abstract AbstractMutableShortValuesMap.SentinelValuesgetSentinelValues()protected abstract intgetTableSize()protected abstract shortgetValueAtIndex(int index)booleanisEmpty()Returns true if this iterable has zero items.protected abstract booleanisNonSentinelAtIndex(int index)shortmax()shortmin()booleannotEmpty()The English equivalent of !this.isEmpty()MutableShortBagreject(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.protected voidremoveEmptyKey()protected voidremoveRemovedKey()MutableShortBagselect(ShortPredicate predicate)Returns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.protected abstract voidsetSentinelValuesNull()intsize()Returns the number of items in this iterable.longsum()short[]toArray()Converts the ShortIterable to a primitive short array.short[]toArray(short[] target)Converts the ShortIterable to a primitive short array.-
Methods inherited from class org.eclipse.collections.impl.primitive.AbstractShortIterable
asLazy, average, maxIfEmpty, median, minIfEmpty, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.MutableShortValuesMap
clear, shortIterator
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, makeString, makeString, makeString, toString
-
Methods inherited from interface org.eclipse.collections.api.ShortIterable
asLazy, average, averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAll, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, maxIfEmpty, median, medianIfEmpty, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, summaryStatistics, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.map.primitive.ShortValuesMap
tap, values
-
-
-
-
Method Detail
-
getOccupiedWithData
protected abstract int getOccupiedWithData()
-
getSentinelValues
protected abstract AbstractMutableShortValuesMap.SentinelValues getSentinelValues()
-
setSentinelValuesNull
protected abstract void setSentinelValuesNull()
-
getEmptyValue
protected abstract short getEmptyValue()
-
getValueAtIndex
protected abstract short getValueAtIndex(int index)
-
getTableSize
protected abstract int getTableSize()
-
isNonSentinelAtIndex
protected abstract boolean isNonSentinelAtIndex(int index)
-
addEmptyKeyValue
protected void addEmptyKeyValue(short value)
-
removeEmptyKey
protected void removeEmptyKey()
-
addRemovedKeyValue
protected void addRemovedKeyValue(short value)
-
removeRemovedKey
protected void removeRemovedKey()
-
contains
public boolean contains(short value)
Description copied from interface:ShortIterableReturns true if the value is contained in the ShortIterable, and false if it is not.- Specified by:
containsin interfaceShortIterable
-
containsAll
public boolean containsAll(ShortIterable source)
Description copied from interface:ShortIterableReturns true if all of the values specified in the source ShortIterable are contained in the ShortIterable, and false if they are not.- Specified by:
containsAllin interfaceShortIterable
-
max
public short max()
- Specified by:
maxin interfaceShortIterable
-
min
public short min()
- Specified by:
minin interfaceShortIterable
-
size
public int size()
Description copied from interface:PrimitiveIterableReturns the number of items in this iterable.- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
Description copied from interface:PrimitiveIterableReturns true if this iterable has zero items.- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
Description copied from interface:PrimitiveIterableThe English equivalent of !this.isEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
each
public void each(ShortProcedure procedure)
Description copied from interface:ShortIterableA synonym for forEach.- Specified by:
eachin interfaceShortIterable- Since:
- 7.0.
-
appendString
public void appendString(java.lang.Appendable appendable, java.lang.String start, java.lang.String separator, java.lang.String end)Description copied from interface:PrimitiveIterablePrints a string representation of this collection onto the givenAppendable. Prints the string returned byPrimitiveIterable.makeString(String, String, String).- Specified by:
appendStringin interfacePrimitiveIterable
-
toArray
public short[] toArray()
Description copied from interface:ShortIterableConverts the ShortIterable to a primitive short array.- Specified by:
toArrayin interfaceShortIterable
-
toArray
public short[] toArray(short[] target)
Description copied from interface:ShortIterableConverts the ShortIterable to a primitive short array. If the collection fits into the provided array it is used to store its elements and is returned from the method, otherwise a new array of the appropriate size is allocated and returned. If the iterable is empty, the target array is returned unchanged.- Specified by:
toArrayin interfaceShortIterable
-
select
public MutableShortBag select(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return true for the specified predicate.- Specified by:
selectin interfaceMutableShortValuesMap- Specified by:
selectin interfaceShortIterable- Specified by:
selectin interfaceShortValuesMap
-
reject
public MutableShortBag reject(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a new ShortIterable with all of the elements in the ShortIterable that return false for the specified predicate.- Specified by:
rejectin interfaceMutableShortValuesMap- Specified by:
rejectin interfaceShortIterable- Specified by:
rejectin interfaceShortValuesMap
-
collect
public <V> MutableBag<V> collect(ShortToObjectFunction<? extends V> function)
Description copied from interface:ShortIterableReturns a new collection with the results of applying the specified function on each element of the source collection. This method is also commonly called transform or map.- Specified by:
collectin interfaceMutableShortValuesMap- Specified by:
collectin interfaceShortIterable- Specified by:
collectin interfaceShortValuesMap
-
detectIfNone
public short detectIfNone(ShortPredicate predicate, short value)
- Specified by:
detectIfNonein interfaceShortIterable
-
count
public int count(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns a count of the number of elements in the ShortIterable that return true for the specified predicate.- Specified by:
countin interfaceShortIterable
-
anySatisfy
public boolean anySatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns true if any of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
anySatisfyin interfaceShortIterable
-
allSatisfy
public boolean allSatisfy(ShortPredicate predicate)
Description copied from interface:ShortIterableReturns true if all of the elements in the ShortIterable return true for the specified predicate, otherwise returns false.- Specified by:
allSatisfyin interfaceShortIterable
-
chunk
public RichIterable<ShortIterable> chunk(int size)
Description copied from interface:ShortIterablePartitions elements in fixed size chunks.- Specified by:
chunkin interfaceShortIterable- Parameters:
size- the number of elements per chunk- Returns:
- A
RichIterablecontainingShortIterables of sizesize, except the last will be truncated if the elements don't divide evenly.
-
sum
public long sum()
- Specified by:
sumin interfaceShortIterable
-
containsValue
public boolean containsValue(short value)
Description copied from interface:ShortValuesMapReturns whether or not this map contains the value.- Specified by:
containsValuein interfaceShortValuesMap- Parameters:
value- the value to test- Returns:
- if this collection contains the value
-
forEachValue
public void forEachValue(ShortProcedure procedure)
Description copied from interface:ShortValuesMapIterates through each value in this map.- Specified by:
forEachValuein interfaceShortValuesMap- Parameters:
procedure- the procedure to invoke for each value in this map.
-
-