Class SynchronizedIntStack
java.lang.Object
org.eclipse.collections.impl.stack.mutable.primitive.SynchronizedIntStack
- All Implemented Interfaces:
Serializable,IntIterable,OrderedIntIterable,PrimitiveIterable,IntStack,MutableIntStack
A synchronized view of a
MutableIntStack. It is imperative that the user manually synchronize on the collection when iterating over it using the
IntIterator, as per Collections.synchronizedCollection(Collection).
This file was automatically generated from template file synchronizedPrimitiveStack.stg.
- Since:
- 3.1.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallSatisfy(IntPredicate predicate) booleananySatisfy(IntPredicate predicate) voidappendString(Appendable appendable) voidappendString(Appendable appendable, String separator) voidappendString(Appendable appendable, String start, String separator, String end) asLazy()doubleaverage()chunk(int size) voidclear()<V> MutableStack<V>collect(IntToObjectFunction<? extends V> function) <V> MutableStack<V>collectWithIndex(IntIntToObjectFunction<? extends V> function) Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.<V,R extends Collection<V>>
RcollectWithIndex(IntIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.booleancontains(int value) booleancontainsAll(int... source) booleancontainsAll(IntIterable source) intcount(IntPredicate predicate) intdetectIfNone(IntPredicate predicate, int ifNone) voideach(IntProcedure procedure) booleanvoidforEachWithIndex(IntIntProcedure procedure) intgetFirst()inthashCode()intindexOf(int value) <T> TinjectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function) <T> TinjectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) Must be called in a synchronized block.booleanisEmpty()makeString(String separator) makeString(String start, String separator, String end) intmax()intmaxIfEmpty(int defaultValue) doublemedian()intmin()intminIfEmpty(int defaultValue) newEmpty()booleannoneSatisfy(IntPredicate predicate) booleannotEmpty()intpeek()peek(int count) intpeekAt(int index) intpop()pop(int count) voidpush(int item) reject(IntPredicate predicate) rejectWithIndex(IntIntPredicate predicate) Returns a new MutableIntStack excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableIntCollection>
RrejectWithIndex(IntIntPredicate predicate, R target) Returns a new MutableIntCollection excluding all elements with corresponding indexes matching the specified predicate.select(IntPredicate predicate) selectWithIndex(IntIntPredicate predicate) Returns a new MutableIntStack including all elements with corresponding indexes matching the specified predicate.<R extends MutableIntCollection>
RselectWithIndex(IntIntPredicate predicate, R target) Returns a new MutableIntCollection including all elements with corresponding indexes matching the specified predicate.intsize()longsum()int[]toArray()int[]toArray(int[] target) toBag()toList()toSet()int[]toStack()toString()Methods inherited from interface org.eclipse.collections.api.IntIterable
averageIfEmpty, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, containsAny, containsAny, containsNone, containsNone, flatCollect, forEach, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, medianIfEmpty, reduce, reduceIfEmpty, reject, select, summaryStatistics, toSortedList, toSortedListBy, toSortedListByMethods inherited from interface org.eclipse.collections.api.stack.primitive.MutableIntStack
tap
-
Constructor Details
-
SynchronizedIntStack
-
SynchronizedIntStack
-
-
Method Details
-
push
public void push(int item) - Specified by:
pushin interfaceMutableIntStack
-
pop
public int pop()- Specified by:
popin interfaceMutableIntStack
-
pop
- Specified by:
popin interfaceMutableIntStack
-
peek
public int peek() -
peek
-
peekAt
public int peekAt(int index) -
size
public int size()- Specified by:
sizein interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()- Specified by:
notEmptyin interfacePrimitiveIterable
-
clear
public void clear()- Specified by:
clearin interfaceMutableIntStack
-
contains
public boolean contains(int value) - Specified by:
containsin interfaceIntIterable
-
containsAll
public boolean containsAll(int... source) - Specified by:
containsAllin interfaceIntIterable
-
containsAll
- Specified by:
containsAllin interfaceIntIterable
-
intIterator
Must be called in a synchronized block.- Specified by:
intIteratorin interfaceIntIterable
-
each
- Specified by:
eachin interfaceIntIterable- Since:
- 7.0.
-
count
- Specified by:
countin interfaceIntIterable
-
anySatisfy
- Specified by:
anySatisfyin interfaceIntIterable
-
allSatisfy
- Specified by:
allSatisfyin interfaceIntIterable
-
noneSatisfy
- Specified by:
noneSatisfyin interfaceIntIterable
-
detectIfNone
- Specified by:
detectIfNonein interfaceIntIterable
-
select
- Specified by:
selectin interfaceIntIterable- Specified by:
selectin interfaceIntStack- Specified by:
selectin interfaceMutableIntStack- Specified by:
selectin interfaceOrderedIntIterable
-
reject
- Specified by:
rejectin interfaceIntIterable- Specified by:
rejectin interfaceIntStack- Specified by:
rejectin interfaceMutableIntStack- Specified by:
rejectin interfaceOrderedIntIterable
-
collect
- Specified by:
collectin interfaceIntIterable- Specified by:
collectin interfaceIntStack- Specified by:
collectin interfaceMutableIntStack- Specified by:
collectin interfaceOrderedIntIterable
-
sum
public long sum()- Specified by:
sumin interfaceIntIterable
-
max
public int max()- Specified by:
maxin interfaceIntIterable
-
min
public int min()- Specified by:
minin interfaceIntIterable
-
minIfEmpty
public int minIfEmpty(int defaultValue) - Specified by:
minIfEmptyin interfaceIntIterable
-
maxIfEmpty
public int maxIfEmpty(int defaultValue) - Specified by:
maxIfEmptyin interfaceIntIterable
-
average
public double average()- Specified by:
averagein interfaceIntIterable
-
median
public double median()- Specified by:
medianin interfaceIntIterable
-
toSortedList
- Specified by:
toSortedListin interfaceIntIterable
-
toSortedArray
public int[] toSortedArray()- Specified by:
toSortedArrayin interfaceIntIterable
-
toArray
public int[] toArray()- Specified by:
toArrayin interfaceIntIterable
-
toArray
public int[] toArray(int[] target) - Specified by:
toArrayin interfaceIntIterable
-
toString
- Specified by:
toStringin interfacePrimitiveIterable- Overrides:
toStringin classObject
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
makeString
- Specified by:
makeStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
appendString
- Specified by:
appendStringin interfacePrimitiveIterable
-
toList
- Specified by:
toListin interfaceIntIterable
-
toSet
- Specified by:
toSetin interfaceIntIterable
-
toBag
- Specified by:
toBagin interfaceIntIterable
-
equals
-
hashCode
public int hashCode() -
asLazy
- Specified by:
asLazyin interfaceIntIterable
-
asUnmodifiable
- Specified by:
asUnmodifiablein interfaceMutableIntStack
-
asSynchronized
- Specified by:
asSynchronizedin interfaceMutableIntStack
-
toImmutable
- Specified by:
toImmutablein interfaceIntStack
-
newEmpty
- Specified by:
newEmptyin interfaceMutableIntStack- Since:
- 9.2.
-
injectInto
- Specified by:
injectIntoin interfaceIntIterable
-
chunk
- Specified by:
chunkin interfaceIntIterable
-
getFirst
public int getFirst()- Specified by:
getFirstin interfaceOrderedIntIterable
-
indexOf
public int indexOf(int value) - Specified by:
indexOfin interfaceOrderedIntIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectIntIntToObjectFunction<? super T, ? extends T> function) - Specified by:
injectIntoWithIndexin interfaceOrderedIntIterable
-
forEachWithIndex
- Specified by:
forEachWithIndexin interfaceOrderedIntIterable
-
selectWithIndex
Returns a new MutableIntStack including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceIntStack- Specified by:
selectWithIndexin interfaceMutableIntStack- Specified by:
selectWithIndexin interfaceOrderedIntIterable- Since:
- 11.1.
-
selectWithIndex
Returns a new MutableIntCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndexin interfaceOrderedIntIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableIntStack excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceIntStack- Specified by:
rejectWithIndexin interfaceMutableIntStack- Specified by:
rejectWithIndexin interfaceOrderedIntIterable- Since:
- 11.1.
-
rejectWithIndex
Returns a new MutableIntCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndexin interfaceOrderedIntIterable- Since:
- 11.1.
-
collectWithIndex
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceIntStack- Specified by:
collectWithIndexin interfaceMutableIntStack- Specified by:
collectWithIndexin interfaceOrderedIntIterable- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(IntIntToObjectFunction<? extends V> function, R target) Adds elements to the target Collection using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndexin interfaceOrderedIntIterable- Since:
- 9.1.
-
toStack
- Specified by:
toStackin interfaceOrderedIntIterable
-