public final class IntInterval extends Object implements org.eclipse.collections.api.list.primitive.ImmutableIntList, Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
allSatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
boolean |
anySatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
void |
appendString(Appendable appendable) |
void |
appendString(Appendable appendable,
String separator) |
void |
appendString(Appendable appendable,
String start,
String separator,
String end) |
org.eclipse.collections.api.LazyIntIterable |
asLazy() |
org.eclipse.collections.api.LazyIntIterable |
asReversed() |
double |
average() |
int |
binarySearch(int value) |
IntInterval |
by(int newStep)
This instance
by method allows IntInterval to act as a fluent builder for itself. |
<V> org.eclipse.collections.api.list.ImmutableList<V> |
collect(org.eclipse.collections.api.block.function.primitive.IntToObjectFunction<? extends V> function) |
boolean |
contains(int value)
Returns true if the IntInterval contains the specified int value.
|
boolean |
containsAll(int... values)
Returns true if the IntInterval contains all of the specified int values.
|
boolean |
containsAll(org.eclipse.collections.api.IntIterable source) |
boolean |
containsNone(int... values)
Returns true if the IntInterval contains none of the specified int values.
|
int |
count(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
int |
detectIfNone(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate,
int ifNone) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
distinct() |
long |
dotProduct(org.eclipse.collections.api.list.primitive.IntList list) |
void |
each(org.eclipse.collections.api.block.procedure.primitive.IntProcedure procedure) |
boolean |
equals(Object otherList) |
static IntInterval |
evensFromTo(int from,
int to)
Returns an IntInterval representing the even values from the value from to the value to.
|
void |
forEach(org.eclipse.collections.api.block.procedure.primitive.IntProcedure procedure) |
void |
forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure procedure) |
static IntInterval |
from(int newFrom)
This static
from method allows IntInterval to act as a fluent builder for itself. |
static IntInterval |
fromTo(int from,
int to)
Returns an IntInterval starting from the value from to the specified value to with a step value of 1.
|
static IntInterval |
fromToBy(int from,
int to,
int stepBy)
Returns an IntInterval for the range of integers inclusively between from and to with the specified
stepBy value.
|
int |
get(int index) |
int |
getFirst() |
int |
getLast() |
int |
hashCode() |
int |
indexOf(int value) |
<T> T |
injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super T,? extends T> function) |
<T> T |
injectIntoWithIndex(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectIntIntToObjectFunction<? super T,? extends T> function) |
org.eclipse.collections.api.iterator.IntIterator |
intIterator() |
boolean |
isEmpty() |
int |
lastIndexOf(int value) |
String |
makeString() |
String |
makeString(String separator) |
String |
makeString(String start,
String separator,
String end) |
int |
max() |
int |
maxIfEmpty(int defaultValue) |
double |
median() |
int |
min() |
int |
minIfEmpty(int defaultValue) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
newWith(int element) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
newWithAll(org.eclipse.collections.api.IntIterable elements) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
newWithout(int element) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
newWithoutAll(org.eclipse.collections.api.IntIterable elements) |
boolean |
noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
boolean |
notEmpty() |
static IntInterval |
oddsFromTo(int from,
int to)
Returns an IntInterval representing the odd values from the value from to the value to.
|
static IntInterval |
oneTo(int count)
Returns an IntInterval starting from 1 to the specified count value with a step value of 1.
|
static IntInterval |
oneToBy(int count,
int step)
Returns an IntInterval starting from 1 to the specified count value with a step value of step.
|
org.eclipse.collections.api.list.primitive.ImmutableIntList |
reject(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
select(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate) |
int |
size()
Calculates and returns the size of the interval.
|
org.eclipse.collections.api.list.primitive.ImmutableIntList |
subList(int fromIndex,
int toIndex) |
long |
sum() |
IntInterval |
to(int newTo)
This instance
to method allows IntInterval to act as a fluent builder for itself. |
int[] |
toArray() |
org.eclipse.collections.api.bag.primitive.MutableIntBag |
toBag() |
org.eclipse.collections.api.list.primitive.ImmutableIntList |
toImmutable() |
org.eclipse.collections.api.list.primitive.MutableIntList |
toList() |
IntInterval |
toReversed()
Returns a new IntInterval with the from and to values reversed and the step value negated.
|
org.eclipse.collections.api.set.primitive.MutableIntSet |
toSet() |
int[] |
toSortedArray() |
org.eclipse.collections.api.list.primitive.MutableIntList |
toSortedList() |
String |
toString() |
static IntInterval |
zero()
Returns an IntInterval starting at zero.
|
static IntInterval |
zeroTo(int count)
Returns an IntInterval starting from 0 to the specified count value with a step value of 1.
|
static IntInterval |
zeroToBy(int count,
int step)
Returns an IntInterval starting from 0 to the specified count value with a step value of step.
|
public static IntInterval from(int newFrom)
from method allows IntInterval to act as a fluent builder for itself.
It works in conjunction with the instance methods to(int) and by(int).
Usage Example:
IntInterval interval1 = IntInterval.from(1).to(5); // results in: 1, 2, 3, 4, 5. IntInterval interval2 = IntInterval.from(1).to(10).by(2); // results in: 1, 3, 5, 7, 9.
public IntInterval to(int newTo)
to method allows IntInterval to act as a fluent builder for itself.
It works in conjunction with the static method from(int) and instance method by(int).
Usage Example:
IntInterval interval1 = IntInterval.from(1).to(5); // results in: 1, 2, 3, 4, 5. IntInterval interval2 = IntInterval.from(1).to(10).by(2); // results in: 1, 3, 5, 7, 9.
public IntInterval by(int newStep)
by method allows IntInterval to act as a fluent builder for itself.
It works in conjunction with the static method from(int) and instance method to(int).
Usage Example:
IntInterval interval1 = IntInterval.from(1).to(5); // results in: 1, 2, 3, 4, 5. IntInterval interval2 = IntInterval.from(1).to(10).by(2); // results in: 1, 3, 5, 7, 9.
public static IntInterval zero()
Usage Example:
IntInterval interval1 = IntInterval.zero().to(5); // results in: 0, 1, 2, 3, 4, 5. IntInterval interval2 = IntInterval.zero().to(10).by(2); // results in: 0, 2, 4, 6, 8, 10.
public static IntInterval oneTo(int count)
public static IntInterval oneToBy(int count, int step)
public static IntInterval zeroTo(int count)
public static IntInterval zeroToBy(int count, int step)
public static IntInterval fromTo(int from, int to)
public static IntInterval evensFromTo(int from, int to)
public static IntInterval oddsFromTo(int from, int to)
public static IntInterval fromToBy(int from, int to, int stepBy)
public boolean containsAll(int... values)
containsAll in interface org.eclipse.collections.api.IntIterablepublic boolean containsAll(org.eclipse.collections.api.IntIterable source)
containsAll in interface org.eclipse.collections.api.IntIterablepublic boolean containsNone(int... values)
public boolean contains(int value)
contains in interface org.eclipse.collections.api.IntIterablepublic void forEachWithIndex(org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure procedure)
forEachWithIndex in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterablepublic void forEach(org.eclipse.collections.api.block.procedure.primitive.IntProcedure procedure)
forEach in interface org.eclipse.collections.api.IntIterablepublic void each(org.eclipse.collections.api.block.procedure.primitive.IntProcedure procedure)
each in interface org.eclipse.collections.api.IntIterablepublic int count(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
count in interface org.eclipse.collections.api.IntIterablepublic boolean anySatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
anySatisfy in interface org.eclipse.collections.api.IntIterablepublic boolean allSatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
allSatisfy in interface org.eclipse.collections.api.IntIterablepublic boolean noneSatisfy(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
noneSatisfy in interface org.eclipse.collections.api.IntIterablepublic boolean equals(Object otherList)
public int hashCode()
public IntInterval toReversed()
toReversed in interface org.eclipse.collections.api.list.primitive.ImmutableIntListtoReversed in interface org.eclipse.collections.api.list.primitive.IntListtoReversed in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic org.eclipse.collections.api.list.primitive.ImmutableIntList distinct()
distinct in interface org.eclipse.collections.api.list.primitive.ImmutableIntListdistinct in interface org.eclipse.collections.api.list.primitive.IntListdistinct in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic org.eclipse.collections.api.list.primitive.ImmutableIntList subList(int fromIndex,
int toIndex)
subList in interface org.eclipse.collections.api.list.primitive.ImmutableIntListsubList in interface org.eclipse.collections.api.list.primitive.IntListpublic int size()
size in interface org.eclipse.collections.api.PrimitiveIterablepublic long dotProduct(org.eclipse.collections.api.list.primitive.IntList list)
dotProduct in interface org.eclipse.collections.api.list.primitive.IntListpublic boolean isEmpty()
isEmpty in interface org.eclipse.collections.api.PrimitiveIterablepublic boolean notEmpty()
notEmpty in interface org.eclipse.collections.api.PrimitiveIterablepublic String makeString()
makeString in interface org.eclipse.collections.api.PrimitiveIterablepublic String makeString(String separator)
makeString in interface org.eclipse.collections.api.PrimitiveIterablepublic String makeString(String start, String separator, String end)
makeString in interface org.eclipse.collections.api.PrimitiveIterablepublic void appendString(Appendable appendable)
appendString in interface org.eclipse.collections.api.PrimitiveIterablepublic void appendString(Appendable appendable, String separator)
appendString in interface org.eclipse.collections.api.PrimitiveIterablepublic void appendString(Appendable appendable, String start, String separator, String end)
appendString in interface org.eclipse.collections.api.PrimitiveIterablepublic int[] toArray()
toArray in interface org.eclipse.collections.api.IntIterablepublic <T> T injectInto(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectIntToObjectFunction<? super T,? extends T> function)
injectInto in interface org.eclipse.collections.api.IntIterablepublic <T> T injectIntoWithIndex(T injectedValue,
org.eclipse.collections.api.block.function.primitive.ObjectIntIntToObjectFunction<? super T,? extends T> function)
injectIntoWithIndex in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterableinjectIntoWithIndex in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic String toString()
public org.eclipse.collections.api.iterator.IntIterator intIterator()
intIterator in interface org.eclipse.collections.api.IntIterablepublic int getFirst()
getFirst in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterablepublic int getLast()
getLast in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic int get(int index)
get in interface org.eclipse.collections.api.list.primitive.IntListpublic int indexOf(int value)
indexOf in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterablepublic int lastIndexOf(int value)
lastIndexOf in interface org.eclipse.collections.api.list.primitive.IntListpublic org.eclipse.collections.api.list.primitive.ImmutableIntList select(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
select in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionselect in interface org.eclipse.collections.api.IntIterableselect in interface org.eclipse.collections.api.list.primitive.ImmutableIntListselect in interface org.eclipse.collections.api.list.primitive.IntListselect in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterableselect in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic org.eclipse.collections.api.list.primitive.ImmutableIntList reject(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate)
reject in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionreject in interface org.eclipse.collections.api.IntIterablereject in interface org.eclipse.collections.api.list.primitive.ImmutableIntListreject in interface org.eclipse.collections.api.list.primitive.IntListreject in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterablereject in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic int detectIfNone(org.eclipse.collections.api.block.predicate.primitive.IntPredicate predicate,
int ifNone)
detectIfNone in interface org.eclipse.collections.api.IntIterablepublic <V> org.eclipse.collections.api.list.ImmutableList<V> collect(org.eclipse.collections.api.block.function.primitive.IntToObjectFunction<? extends V> function)
collect in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectioncollect in interface org.eclipse.collections.api.IntIterablecollect in interface org.eclipse.collections.api.list.primitive.ImmutableIntListcollect in interface org.eclipse.collections.api.list.primitive.IntListcollect in interface org.eclipse.collections.api.ordered.primitive.OrderedIntIterablecollect in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic org.eclipse.collections.api.LazyIntIterable asReversed()
asReversed in interface org.eclipse.collections.api.ordered.primitive.ReversibleIntIterablepublic long sum()
sum in interface org.eclipse.collections.api.IntIterablepublic int max()
max in interface org.eclipse.collections.api.IntIterablepublic int min()
min in interface org.eclipse.collections.api.IntIterablepublic int minIfEmpty(int defaultValue)
minIfEmpty in interface org.eclipse.collections.api.IntIterablepublic int maxIfEmpty(int defaultValue)
maxIfEmpty in interface org.eclipse.collections.api.IntIterablepublic double average()
average in interface org.eclipse.collections.api.IntIterablepublic double median()
median in interface org.eclipse.collections.api.IntIterablepublic int binarySearch(int value)
binarySearch in interface org.eclipse.collections.api.list.primitive.IntListpublic int[] toSortedArray()
toSortedArray in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.list.primitive.MutableIntList toList()
toList in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.list.primitive.MutableIntList toSortedList()
toSortedList in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.set.primitive.MutableIntSet toSet()
toSet in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.bag.primitive.MutableIntBag toBag()
toBag in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.LazyIntIterable asLazy()
asLazy in interface org.eclipse.collections.api.IntIterablepublic org.eclipse.collections.api.list.primitive.ImmutableIntList toImmutable()
toImmutable in interface org.eclipse.collections.api.list.primitive.IntListpublic org.eclipse.collections.api.list.primitive.ImmutableIntList newWith(int element)
newWith in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionnewWith in interface org.eclipse.collections.api.list.primitive.ImmutableIntListpublic org.eclipse.collections.api.list.primitive.ImmutableIntList newWithout(int element)
newWithout in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionnewWithout in interface org.eclipse.collections.api.list.primitive.ImmutableIntListpublic org.eclipse.collections.api.list.primitive.ImmutableIntList newWithAll(org.eclipse.collections.api.IntIterable elements)
newWithAll in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionnewWithAll in interface org.eclipse.collections.api.list.primitive.ImmutableIntListpublic org.eclipse.collections.api.list.primitive.ImmutableIntList newWithoutAll(org.eclipse.collections.api.IntIterable elements)
newWithoutAll in interface org.eclipse.collections.api.collection.primitive.ImmutableIntCollectionnewWithoutAll in interface org.eclipse.collections.api.list.primitive.ImmutableIntListCopyright © 2004–2017. All rights reserved.