Class UnmodifiableLongList
- java.lang.Object
-
- org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection
-
- org.eclipse.collections.impl.list.mutable.primitive.UnmodifiableLongList
-
- All Implemented Interfaces:
Serializable
,MutableLongCollection
,LongList
,MutableLongList
,LongIterable
,OrderedLongIterable
,ReversibleLongIterable
,PrimitiveIterable
public class UnmodifiableLongList extends AbstractUnmodifiableLongCollection implements MutableLongList
This file was automatically generated from template file unmodifiablePrimitiveList.stg.- Since:
- 3.1.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description UnmodifiableLongList(MutableLongList list)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
addAllAtIndex(int index, long... source)
boolean
addAllAtIndex(int index, LongIterable source)
void
addAtIndex(int index, long element)
LazyLongIterable
asReversed()
MutableLongList
asSynchronized()
MutableLongList
asUnmodifiable()
int
binarySearch(long value)
MutableList<Long>
boxed()
<V> MutableList<V>
collect(LongToObjectFunction<? extends V> function)
<V> MutableList<V>
collectWithIndex(LongIntToObjectFunction<? extends V> function)
Returns a new MutableList 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.MutableLongList
distinct()
long
dotProduct(LongList list)
boolean
equals(Object otherList)
void
forEachWithIndex(LongIntProcedure procedure)
long
get(int index)
long
getFirst()
long
getLast()
int
hashCode()
int
indexOf(long value)
<T> T
injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
int
lastIndexOf(long value)
MutableLongList
newEmpty()
MutableLongList
reject(LongPredicate predicate)
MutableLongList
rejectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.<R extends MutableLongCollection>
RrejectWithIndex(LongIntPredicate predicate, R target)
Returns a new MutableLongCollection excluding all elements with corresponding indexes matching the specified predicate.long
removeAtIndex(int index)
MutableLongList
reverseThis()
MutableLongList
select(LongPredicate predicate)
MutableLongList
selectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.<R extends MutableLongCollection>
RselectWithIndex(LongIntPredicate predicate, R target)
Returns a new MutableLongCollection including all elements with corresponding indexes matching the specified predicate.long
set(int index, long element)
MutableLongList
shuffleThis()
MutableLongList
sortThis()
Spliterator.OfLong
spliterator()
MutableLongList
subList(int fromIndex, int toIndex)
ImmutableLongList
toImmutable()
MutableLongList
toReversed()
UnmodifiableLongList
with(long element)
UnmodifiableLongList
withAll(LongIterable elements)
UnmodifiableLongList
without(long element)
UnmodifiableLongList
withoutAll(LongIterable elements)
<T> MutableList<LongObjectPair<T>>
zip(Iterable<T> iterable)
MutableList<LongLongPair>
zipLong(LongIterable iterable)
-
Methods inherited from class org.eclipse.collections.impl.collection.mutable.primitive.AbstractUnmodifiableLongCollection
add, addAll, addAll, allSatisfy, anySatisfy, appendString, appendString, appendString, asLazy, average, chunk, clear, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, injectInto, isEmpty, longIterator, makeString, makeString, makeString, max, maxIfEmpty, median, min, minIfEmpty, noneSatisfy, notEmpty, reduce, reduceIfEmpty, remove, removeAll, removeAll, removeIf, retainAll, retainAll, size, sum, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toString
-
Methods inherited from interface org.eclipse.collections.api.LongIterable
allSatisfy, anySatisfy, asLazy, average, averageIfEmpty, chunk, collect, collectBoolean, collectByte, collectChar, collectDouble, collectFloat, collectInt, collectLong, collectShort, contains, containsAll, containsAll, containsAny, containsAny, containsNone, containsNone, count, detectIfNone, each, flatCollect, forEach, injectInto, injectIntoBoolean, injectIntoByte, injectIntoChar, injectIntoDouble, injectIntoFloat, injectIntoInt, injectIntoLong, injectIntoShort, max, maxIfEmpty, median, medianIfEmpty, min, minIfEmpty, noneSatisfy, reduce, reduceIfEmpty, reject, select, sum, summaryStatistics, toArray, toArray, toBag, toList, toSet, toSortedArray, toSortedList, toSortedList, toSortedListBy, toSortedListBy
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.LongList
forEachInBoth, primitiveParallelStream, primitiveStream
-
Methods inherited from interface org.eclipse.collections.api.collection.primitive.MutableLongCollection
add, addAll, addAll, clear, longIterator, remove, removeAll, removeAll, removeIf, retainAll, retainAll
-
Methods inherited from interface org.eclipse.collections.api.list.primitive.MutableLongList
shuffleThis, sortThis, sortThisBy, sortThisBy, swap, tap
-
Methods inherited from interface org.eclipse.collections.api.PrimitiveIterable
appendString, appendString, appendString, isEmpty, makeString, makeString, makeString, notEmpty, size, toString
-
-
-
-
Constructor Detail
-
UnmodifiableLongList
public UnmodifiableLongList(MutableLongList list)
-
-
Method Detail
-
getFirst
public long getFirst()
- Specified by:
getFirst
in interfaceOrderedLongIterable
-
getLast
public long getLast()
- Specified by:
getLast
in interfaceReversibleLongIterable
-
indexOf
public int indexOf(long value)
- Specified by:
indexOf
in interfaceOrderedLongIterable
-
lastIndexOf
public int lastIndexOf(long value)
- Specified by:
lastIndexOf
in interfaceLongList
-
boxed
public MutableList<Long> boxed()
- Specified by:
boxed
in interfaceMutableLongList
-
addAtIndex
public void addAtIndex(int index, long element)
- Specified by:
addAtIndex
in interfaceMutableLongList
-
addAllAtIndex
public boolean addAllAtIndex(int index, long... source)
- Specified by:
addAllAtIndex
in interfaceMutableLongList
-
addAllAtIndex
public boolean addAllAtIndex(int index, LongIterable source)
- Specified by:
addAllAtIndex
in interfaceMutableLongList
-
removeAtIndex
public long removeAtIndex(int index)
- Specified by:
removeAtIndex
in interfaceMutableLongList
-
set
public long set(int index, long element)
- Specified by:
set
in interfaceMutableLongList
-
with
public UnmodifiableLongList with(long element)
- Specified by:
with
in interfaceMutableLongCollection
- Specified by:
with
in interfaceMutableLongList
- Overrides:
with
in classAbstractUnmodifiableLongCollection
-
without
public UnmodifiableLongList without(long element)
- Specified by:
without
in interfaceMutableLongCollection
- Specified by:
without
in interfaceMutableLongList
- Overrides:
without
in classAbstractUnmodifiableLongCollection
-
withAll
public UnmodifiableLongList withAll(LongIterable elements)
- Specified by:
withAll
in interfaceMutableLongCollection
- Specified by:
withAll
in interfaceMutableLongList
- Overrides:
withAll
in classAbstractUnmodifiableLongCollection
-
withoutAll
public UnmodifiableLongList withoutAll(LongIterable elements)
- Specified by:
withoutAll
in interfaceMutableLongCollection
- Specified by:
withoutAll
in interfaceMutableLongList
- Overrides:
withoutAll
in classAbstractUnmodifiableLongCollection
-
select
public MutableLongList select(LongPredicate predicate)
- Specified by:
select
in interfaceLongIterable
- Specified by:
select
in interfaceLongList
- Specified by:
select
in interfaceMutableLongCollection
- Specified by:
select
in interfaceMutableLongList
- Specified by:
select
in interfaceOrderedLongIterable
- Specified by:
select
in interfaceReversibleLongIterable
- Overrides:
select
in classAbstractUnmodifiableLongCollection
-
reject
public MutableLongList reject(LongPredicate predicate)
- Specified by:
reject
in interfaceLongIterable
- Specified by:
reject
in interfaceLongList
- Specified by:
reject
in interfaceMutableLongCollection
- Specified by:
reject
in interfaceMutableLongList
- Specified by:
reject
in interfaceOrderedLongIterable
- Specified by:
reject
in interfaceReversibleLongIterable
- Overrides:
reject
in classAbstractUnmodifiableLongCollection
-
collect
public <V> MutableList<V> collect(LongToObjectFunction<? extends V> function)
- Specified by:
collect
in interfaceLongIterable
- Specified by:
collect
in interfaceLongList
- Specified by:
collect
in interfaceMutableLongCollection
- Specified by:
collect
in interfaceMutableLongList
- Specified by:
collect
in interfaceOrderedLongIterable
- Specified by:
collect
in interfaceReversibleLongIterable
- Overrides:
collect
in classAbstractUnmodifiableLongCollection
-
sortThis
public MutableLongList sortThis()
- Specified by:
sortThis
in interfaceMutableLongList
-
shuffleThis
public MutableLongList shuffleThis()
- Specified by:
shuffleThis
in interfaceMutableLongList
-
binarySearch
public int binarySearch(long value)
- Specified by:
binarySearch
in interfaceLongList
-
dotProduct
public long dotProduct(LongList list)
- Specified by:
dotProduct
in interfaceLongList
-
equals
public boolean equals(Object otherList)
-
hashCode
public int hashCode()
-
asUnmodifiable
public MutableLongList asUnmodifiable()
- Specified by:
asUnmodifiable
in interfaceMutableLongCollection
- Specified by:
asUnmodifiable
in interfaceMutableLongList
- Overrides:
asUnmodifiable
in classAbstractUnmodifiableLongCollection
-
asSynchronized
public MutableLongList asSynchronized()
- Specified by:
asSynchronized
in interfaceMutableLongCollection
- Specified by:
asSynchronized
in interfaceMutableLongList
- Overrides:
asSynchronized
in classAbstractUnmodifiableLongCollection
-
toImmutable
public ImmutableLongList toImmutable()
- Specified by:
toImmutable
in interfaceLongList
- Specified by:
toImmutable
in interfaceMutableLongCollection
- Specified by:
toImmutable
in interfaceMutableLongList
- Overrides:
toImmutable
in classAbstractUnmodifiableLongCollection
-
newEmpty
public MutableLongList newEmpty()
- Specified by:
newEmpty
in interfaceMutableLongCollection
- Specified by:
newEmpty
in interfaceMutableLongList
- Since:
- 9.2.
-
reverseThis
public MutableLongList reverseThis()
- Specified by:
reverseThis
in interfaceMutableLongList
-
toReversed
public MutableLongList toReversed()
- Specified by:
toReversed
in interfaceLongList
- Specified by:
toReversed
in interfaceMutableLongList
- Specified by:
toReversed
in interfaceReversibleLongIterable
-
forEachWithIndex
public void forEachWithIndex(LongIntProcedure procedure)
- Specified by:
forEachWithIndex
in interfaceOrderedLongIterable
-
asReversed
public LazyLongIterable asReversed()
- Specified by:
asReversed
in interfaceReversibleLongIterable
-
injectIntoWithIndex
public <T> T injectIntoWithIndex(T injectedValue, ObjectLongIntToObjectFunction<? super T,? extends T> function)
- Specified by:
injectIntoWithIndex
in interfaceOrderedLongIterable
- Specified by:
injectIntoWithIndex
in interfaceReversibleLongIterable
-
distinct
public MutableLongList distinct()
- Specified by:
distinct
in interfaceLongList
- Specified by:
distinct
in interfaceMutableLongList
- Specified by:
distinct
in interfaceReversibleLongIterable
- Since:
- 6.0.
-
subList
public MutableLongList subList(int fromIndex, int toIndex)
- Specified by:
subList
in interfaceLongList
- Specified by:
subList
in interfaceMutableLongList
-
zipLong
public MutableList<LongLongPair> zipLong(LongIterable iterable)
- Specified by:
zipLong
in interfaceLongList
- Specified by:
zipLong
in interfaceMutableLongList
- Since:
- 9.1.
-
zip
public <T> MutableList<LongObjectPair<T>> zip(Iterable<T> iterable)
- Specified by:
zip
in interfaceLongList
- Specified by:
zip
in interfaceMutableLongList
- Since:
- 9.1.
-
selectWithIndex
public MutableLongList selectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongList including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceLongList
- Specified by:
selectWithIndex
in interfaceMutableLongList
- Specified by:
selectWithIndex
in interfaceOrderedLongIterable
- Specified by:
selectWithIndex
in interfaceReversibleLongIterable
- Since:
- 11.1.
-
selectWithIndex
public <R extends MutableLongCollection> R selectWithIndex(LongIntPredicate predicate, R target)
Returns a new MutableLongCollection including all elements with corresponding indexes matching the specified predicate.- Specified by:
selectWithIndex
in interfaceOrderedLongIterable
- Since:
- 11.1.
-
rejectWithIndex
public MutableLongList rejectWithIndex(LongIntPredicate predicate)
Returns a new MutableLongList excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceLongList
- Specified by:
rejectWithIndex
in interfaceMutableLongList
- Specified by:
rejectWithIndex
in interfaceOrderedLongIterable
- Specified by:
rejectWithIndex
in interfaceReversibleLongIterable
- Since:
- 11.1.
-
rejectWithIndex
public <R extends MutableLongCollection> R rejectWithIndex(LongIntPredicate predicate, R target)
Returns a new MutableLongCollection excluding all elements with corresponding indexes matching the specified predicate.- Specified by:
rejectWithIndex
in interfaceOrderedLongIterable
- Since:
- 11.1.
-
collectWithIndex
public <V> MutableList<V> collectWithIndex(LongIntToObjectFunction<? extends V> function)
Returns a new MutableList using results obtained by applying the specified function to each element and its corresponding index.- Specified by:
collectWithIndex
in interfaceLongList
- Specified by:
collectWithIndex
in interfaceMutableLongList
- Specified by:
collectWithIndex
in interfaceOrderedLongIterable
- Specified by:
collectWithIndex
in interfaceReversibleLongIterable
- 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.
-
spliterator
public Spliterator.OfLong spliterator()
- Specified by:
spliterator
in interfaceLongList
-
-