Top Description Inners Fields Constructors Methods
org.eclipse.collections.impl.list.primitive

public final Class IntInterval

extends Object
implements ImmutableIntList, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.eclipse.collections.api.list.primitive.ImmutableIntList, org.eclipse.collections.api.list.primitive.IntList, org.eclipse.collections.api.ordered.primitive.ReversibleIntIterable, org.eclipse.collections.api.ordered.primitive.OrderedIntIterable, org.eclipse.collections.api.IntIterable, org.eclipse.collections.api.PrimitiveIterable, org.eclipse.collections.api.collection.primitive.ImmutableIntCollection
Imports
java.io.IOException, .ObjectInputStream, .Serializable, java.util.Arrays, .Comparator, .Iterator, .NoSuchElementException, .Spliterator, java.util.function.IntConsumer, org.eclipse.collections.api.IntIterable, .LazyIntIterable, .RichIterable, org.eclipse.collections.api.bag.primitive.MutableIntBag, org.eclipse.collections.api.block.function.primitive.IntToObjectFunction, .ObjectIntIntToObjectFunction, .ObjectIntToObjectFunction, org.eclipse.collections.api.block.predicate.primitive.IntPredicate, org.eclipse.collections.api.block.procedure.primitive.IntIntProcedure, .IntProcedure, org.eclipse.collections.api.factory.Lists, org.eclipse.collections.api.factory.primitive.IntBags, .IntLists, .IntSets, org.eclipse.collections.api.iterator.IntIterator, org.eclipse.collections.api.list.ImmutableList, .MutableList, org.eclipse.collections.api.list.primitive.ImmutableIntList, .IntList, .MutableIntList, org.eclipse.collections.api.set.primitive.MutableIntSet, org.eclipse.collections.api.stack.primitive.MutableIntStack, org.eclipse.collections.api.tuple.primitive.IntIntPair, .IntObjectPair, org.eclipse.collections.impl.factory.primitive.IntStacks, org.eclipse.collections.impl.lazy.primitive.CollectIntToObjectIterable, .LazyIntIterableAdapter, .ReverseIntIterable, .SelectIntIterable, org.eclipse.collections.impl.list.IntervalUtils, org.eclipse.collections.impl.tuple.primitive.PrimitiveTuples, org.eclipse.collections.impl.utility.Iterate

An IntInterval is a range of ints that may be iterated over using a step value.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private static class

Field Summary

Modifier and TypeField and Description
private final int
private static final long
private transient int
private final int
private final int

Constructor Summary

AccessConstructor and Description
private
IntInterval(int from, int to, int step)

Method Summary

Modifier and TypeMethod and Description
public boolean
allSatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.allSatisfy.

Returns true if all of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

public boolean
anySatisfy(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.anySatisfy.

Returns true if any of the elements in the IntIterable return true for the specified predicate, otherwise returns false.

public void
appendString(Appendable appendable)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public void
appendString(Appendable appendable, String start, String separator, String end)

Implements org.eclipse.collections.api.PrimitiveIterable.appendString.

Prints a string representation of this collection onto the given Appendable.

public LazyIntIterable
asLazy()

Implements org.eclipse.collections.api.IntIterable.asLazy.

Returns a LazyIntIterable adapter wrapping the source IntIterable.

public LazyIntIterable
public double
public int
public IntInterval
by(int newStep)

This instance by method allows IntInterval to act as a fluent builder for itself.

private void
checkBounds(String name, int index)

public RichIterable<IntIterable>
chunk(int size)

Overrides default org.eclipse.collections.api.IntIterable.chunk.

Partitions elements in fixed size chunks.

public <V> ImmutableList<V>
collect(IntToObjectFunction<? extends V> function)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.collect.

Returns a new collection with the results of applying the specified function on each element of the source collection.

public boolean
contains(int value)

Implements org.eclipse.collections.api.IntIterable.contains.

Returns true if the IntInterval contains the specified int value.

public boolean
containsAll(int... values)

Overrides default org.eclipse.collections.api.IntIterable.containsAll.

Returns true if the IntInterval contains all the specified int values.

public boolean
containsAll(IntIterable source)

Overrides default org.eclipse.collections.api.IntIterable.containsAll.

Returns true if all of the values specified in the source IntIterable are contained in the IntIterable, and false if they are not.

public boolean
containsNone(int... values)

Overrides default org.eclipse.collections.api.IntIterable.containsNone.

Returns true if the IntInterval contains none of the specified int values.

public int
count(IntPredicate predicate)

Implements org.eclipse.collections.api.IntIterable.count.

Returns a count of the number of elements in the IntIterable that return true for the specified predicate.

public int
public ImmutableIntList
public long
public void
each(IntProcedure procedure)

Implements org.eclipse.collections.api.IntIterable.each.

A synonym for forEach.

public boolean
public static IntInterval
evensFromTo(int from, int to)

Returns an IntInterval representing the even values from the value from to the value to.

public void
public static IntInterval
from(int newFrom)

This static from method allows IntInterval to act as a fluent builder for itself.

public 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.

public 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.

public int
public int
public int
private boolean
public int
public int
public <T> T
injectInto(T injectedValue, ObjectIntToObjectFunction<? super T, ? extends T> function)

Implements org.eclipse.collections.api.IntIterable.injectInto.

public <T> T
public IntIterator
intIterator()

Implements org.eclipse.collections.api.IntIterable.intIterator.

Returns a primitive iterator that can be used to iterate over the IntIterable in an imperative style.

public boolean
isEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.isEmpty.

Returns true if this iterable has zero items.

public int
public String
makeString()

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String) and defaulting the separator parameter to the characters ", " (comma and space).

public String
makeString(String separator)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection by delegating to makeString(String, String, String) and defaulting the start and end parameters to "" (the empty String).

public String
makeString(String start, String separator, String end)

Overrides default org.eclipse.collections.api.PrimitiveIterable.makeString.

Returns a string representation of this collection with the elements separated by the specified separator and enclosed between the start and end strings.

public int
public int
public double
public int
public int
public ImmutableIntList
public ImmutableIntList
public ImmutableIntList
public ImmutableIntList
public boolean
notEmpty()

Overrides default org.eclipse.collections.api.PrimitiveIterable.notEmpty.

The English equivalent of !this.isEmpty()

public static IntInterval
oddsFromTo(int from, int to)

Returns an IntInterval representing the odd values from the value from to the value to.

public static IntInterval
oneTo(int count)

Returns an IntInterval starting from 1 to the specified count value with a step value of 1.

public static IntInterval
oneToBy(int count, int step)

Returns an IntInterval starting from 1 to the specified count value with a step value of step.

private void
public ImmutableIntList
reject(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.reject.

Returns a new IntIterable with all of the elements in the IntIterable that return false for the specified predicate.

public ImmutableIntList
select(IntPredicate predicate)

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.select.

Returns a new IntIterable with all of the elements in the IntIterable that return true for the specified predicate.

public int
size()

Implements org.eclipse.collections.api.PrimitiveIterable.size.

Returns the size of the interval.

public Spliterator.OfInt
public ImmutableIntList
public long
public IntInterval
to(int newTo)

This instance to method allows IntInterval to act as a fluent builder for itself.

public int[]
toArray()

Implements org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public int[]
toArray(int[] result)

Overrides default org.eclipse.collections.api.IntIterable.toArray.

Converts the IntIterable to a primitive int array.

public MutableIntBag
toBag()

Implements org.eclipse.collections.api.IntIterable.toBag.

Converts the IntIterable to a new MutableIntBag.

public ImmutableIntList
toImmutable()

Implements org.eclipse.collections.api.list.primitive.IntList.toImmutable.

Returns an immutable copy of this list.

public MutableIntList
toList()

Implements org.eclipse.collections.api.IntIterable.toList.

Converts the IntIterable to a new MutableIntList.

public IntInterval
toReversed()

Implements org.eclipse.collections.api.list.primitive.ImmutableIntList.toReversed.

Returns a new IntInterval with the from and to values reversed and the step value negated.

public MutableIntSet
toSet()

Implements org.eclipse.collections.api.IntIterable.toSet.

Converts the IntIterable to a new MutableIntSet.

public int[]
public MutableIntList
public MutableIntStack
toStack()

Overrides default org.eclipse.collections.api.ordered.primitive.OrderedIntIterable.toStack.

Converts the collection to a IntStack.

public String
toString()

Overrides java.lang.Object.toString.

Implements org.eclipse.collections.api.PrimitiveIterable.toString.

Returns a string with the elements of this iterable separated by commas with spaces and enclosed in square brackets.

public static IntInterval
zero()

Returns an IntInterval starting at zero.

public static IntInterval
zeroTo(int count)

Returns an IntInterval starting from 0 to the specified count value with a step value of 1.

public 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 <T> ImmutableList<IntObjectPair<T>>
zip(Iterable<T> iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zip.

Returns an ImmutableList formed from this ImmutableIntList and a ListIterable by combining corresponding elements in pairs.

public ImmutableList<IntIntPair>
zipInt(IntIterable iterable)

Overrides default org.eclipse.collections.api.list.primitive.ImmutableIntList.zipInt.

Returns an ImmutableList formed from this ImmutableIntList and another IntList by combining corresponding elements in pairs.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait