Class UnmodifiableLongStack
- java.lang.Object
-
- org.eclipse.collections.impl.stack.mutable.primitive.UnmodifiableLongStack
-
- All Implemented Interfaces:
Serializable
,LongIterable
,OrderedLongIterable
,PrimitiveIterable
,LongStack
,MutableLongStack
public class UnmodifiableLongStack extends Object implements MutableLongStack, Serializable
This file was automatically generated from template file unmodifiablePrimitiveStack.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableLongStack(MutableLongStack stack)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allSatisfy(LongPredicate predicate)
boolean
anySatisfy(LongPredicate predicate)
void
appendString(Appendable appendable)
void
appendString(Appendable appendable, String separator)
void
appendString(Appendable appendable, String start, String separator, String end)
LazyLongIterable
asLazy()
MutableLongStack
asSynchronized()
MutableLongStack
asUnmodifiable()
double
average()
RichIterable<LongIterable>
chunk(int size)
void
clear()
<V> MutableStack<V>
collect(LongToObjectFunction<? extends V> function)
<V> MutableStack<V>
collectWithIndex(LongIntToObjectFunction<? 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(LongIntToObjectFunction<? 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.boolean
contains(long value)
boolean
containsAll(long... source)
boolean
containsAll(LongIterable source)
int
count(LongPredicate predicate)
long
detectIfNone(LongPredicate predicate, long ifNone)
void
each(LongProcedure procedure)
boolean
equals(Object otherStack)
void
forEachWithIndex(LongIntProcedure procedure)
long
getFirst()
int
hashCode()
int
indexOf(long value)
<T> T
injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)
<T> T
injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
boolean
isEmpty()
LongIterator
longIterator()
String
makeString()
String
makeString(String separator)
String
makeString(String start, String separator, String end)
long
max()
long
maxIfEmpty(long defaultValue)
double
median()
long
min()
long
minIfEmpty(long defaultValue)
MutableLongStack
newEmpty()
boolean
noneSatisfy(LongPredicate predicate)
boolean
notEmpty()
long
peek()
LongList
peek(int count)
long
peekAt(int index)
long
pop()
LongList
pop(int count)
void
push(long item)
MutableLongStack
reject(LongPredicate predicate)
MutableLongStack
select(LongPredicate predicate)
int
size()
long
sum()
long[]
toArray()
long[]
toArray(long[] target)
MutableLongBag
toBag()
ImmutableLongStack
toImmutable()
MutableLongList
toList()
MutableLongSet
toSet()
long[]
toSortedArray()
MutableLongList
toSortedList()
String
toString()
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
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, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.stack.primitive.MutableLongStack
rejectWithIndex, selectWithIndex, tap
-
Methods inherited from interface org.eclipse.collections.api.ordered.primitive.OrderedLongIterable
rejectWithIndex, selectWithIndex
-
-
-
-
Constructor Detail
-
UnmodifiableLongStack
public UnmodifiableLongStack(MutableLongStack stack)
-
-
Method Detail
-
push
public void push(long item)
- Specified by:
push
in interfaceMutableLongStack
-
pop
public long pop()
- Specified by:
pop
in interfaceMutableLongStack
-
pop
public LongList pop(int count)
- Specified by:
pop
in interfaceMutableLongStack
-
size
public int size()
- Specified by:
size
in interfacePrimitiveIterable
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacePrimitiveIterable
-
notEmpty
public boolean notEmpty()
- Specified by:
notEmpty
in interfacePrimitiveIterable
-
clear
public void clear()
- Specified by:
clear
in interfaceMutableLongStack
-
contains
public boolean contains(long value)
- Specified by:
contains
in interfaceLongIterable
-
containsAll
public boolean containsAll(long... source)
- Specified by:
containsAll
in interfaceLongIterable
-
containsAll
public boolean containsAll(LongIterable source)
- Specified by:
containsAll
in interfaceLongIterable
-
longIterator
public LongIterator longIterator()
- Specified by:
longIterator
in interfaceLongIterable
-
each
public void each(LongProcedure procedure)
- Specified by:
each
in interfaceLongIterable
- Since:
- 7.0.
-
count
public int count(LongPredicate predicate)
- Specified by:
count
in interfaceLongIterable
-
anySatisfy
public boolean anySatisfy(LongPredicate predicate)
- Specified by:
anySatisfy
in interfaceLongIterable
-
allSatisfy
public boolean allSatisfy(LongPredicate predicate)
- Specified by:
allSatisfy
in interfaceLongIterable
-
noneSatisfy
public boolean noneSatisfy(LongPredicate predicate)
- Specified by:
noneSatisfy
in interfaceLongIterable
-
detectIfNone
public long detectIfNone(LongPredicate predicate, long ifNone)
- Specified by:
detectIfNone
in interfaceLongIterable
-
select
public MutableLongStack select(LongPredicate predicate)
- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceLongStack
- Specified by:
select
in interfaceMutableLongStack
- Specified by:
select
in interfaceOrderedLongIterable
-
reject
public MutableLongStack reject(LongPredicate predicate)
- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceLongStack
- Specified by:
reject
in interfaceMutableLongStack
- Specified by:
reject
in interfaceOrderedLongIterable
-
collect
public <V> MutableStack<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceLongIterable
- Specified by:
collect
in interfaceLongStack
- Specified by:
collect
in interfaceMutableLongStack
- Specified by:
collect
in interfaceOrderedLongIterable
-
sum
public long sum()
- Specified by:
sum
in interfaceLongIterable
-
max
public long max()
- Specified by:
max
in interfaceLongIterable
-
min
public long min()
- Specified by:
min
in interfaceLongIterable
-
minIfEmpty
public long minIfEmpty(long defaultValue)
- Specified by:
minIfEmpty
in interfaceLongIterable
-
maxIfEmpty
public long maxIfEmpty(long defaultValue)
- Specified by:
maxIfEmpty
in interfaceLongIterable
-
average
public double average()
- Specified by:
average
in interfaceLongIterable
-
median
public double median()
- Specified by:
median
in interfaceLongIterable
-
toSortedList
public MutableLongList toSortedList()
- Specified by:
toSortedList
in interfaceLongIterable
-
toSortedArray
public long[] toSortedArray()
- Specified by:
toSortedArray
in interfaceLongIterable
-
toArray
public long[] toArray()
- Specified by:
toArray
in interfaceLongIterable
-
toArray
public long[] toArray(long[] target)
- Specified by:
toArray
in interfaceLongIterable
-
toString
public String toString()
- Specified by:
toString
in interfacePrimitiveIterable
- Overrides:
toString
in classObject
-
makeString
public String makeString()
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String separator)
- Specified by:
makeString
in interfacePrimitiveIterable
-
makeString
public String makeString(String start, String separator, String end)
- Specified by:
makeString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String separator)
- Specified by:
appendString
in interfacePrimitiveIterable
-
appendString
public void appendString(Appendable appendable, String start, String separator, String end)
- Specified by:
appendString
in interfacePrimitiveIterable
-
toList
public MutableLongList toList()
- Specified by:
toList
in interfaceLongIterable
-
toSet
public MutableLongSet toSet()
- Specified by:
toSet
in interfaceLongIterable
-
toBag
public MutableLongBag toBag()
- Specified by:
toBag
in interfaceLongIterable
-
equals
public boolean equals(Object otherStack)
-
hashCode
public int hashCode()
-
asLazy
public LazyLongIterable asLazy()
- Specified by:
asLazy
in interfaceLongIterable
-
asUnmodifiable
public MutableLongStack asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongStack
-
asSynchronized
public MutableLongStack asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongStack
-
toImmutable
public ImmutableLongStack toImmutable()
- Specified by:
toImmutable
in interfaceLongStack
-
newEmpty
public MutableLongStack newEmpty()
- Specified by:
newEmpty
in interfaceMutableLongStack
- Since:
- 9.2.
-
injectInto
public <T> T injectInto(T injectedValue, ObjectLongToObjectFunction<? super T,? extends T> function)
- Specified by:
injectInto
in interfaceLongIterable
-
chunk
public RichIterable<LongIterable> chunk(int size)
- Specified by:
chunk
in interfaceLongIterable
-
getFirst
public long getFirst()
- Specified by:
getFirst
in interfaceOrderedLongIterable
-
indexOf
public int indexOf(long value)
- Specified by:
indexOf
in interfaceOrderedLongIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedLongIterable
-
forEachWithIndex
public void forEachWithIndex(LongIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedLongIterable
-
collectWithIndex
public <V> MutableStack<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)
Returns a new MutableStack using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceLongStack
- Specified by:
collectWithIndex
in interfaceMutableLongStack
- Specified by:
collectWithIndex
in interfaceOrderedLongIterable
- Since:
- 9.1.
-
collectWithIndex
public <V,R extends Collection<V>> R collectWithIndex(LongIntToObjectFunction<? 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:
collectWithIndex
in interfaceOrderedLongIterable
- Since:
- 9.1.
-
-