public class RangeOfInt extends Object implements UnmodList<Integer>, Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
RangeOfInt.Equat |
UnmodList.AbstractUnmodList<E>| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(int i)
Returns true if the number is within the bounds of this range (low end incluive, high end
exclusive).
|
boolean |
contains(Object o)
Though this overrides List.contains(Object o), it is effectively a convenience method for
calling contains(int i).
|
boolean |
equals(Object other) |
Integer |
get(int idx) |
int |
hashCode() |
int |
indexOf(Object o)
Unlike most implementations of List, this method has excellent O(1) performance!
The default implementation of this method has O(this.size()) performance.
|
int |
lastIndexOf(Object o)
Unlike most implementations of List, this method has excellent O(1) performance!
The default implementation of this method has O(this.size()) performance.
|
UnmodListIterator<Integer> |
listIterator(int startIdx)
Subclasses should override this when they can do so more efficiently.
|
static RangeOfInt |
of(Number e) |
static RangeOfInt |
of(Number s,
Number e) |
int |
size()
Returns the number of items in this collection or iterable.
|
RangeOfInt |
subList(int fromIndex,
int toIndex) |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitadd, add, addAll, addAll, clear, containsAll, isEmpty, iterator, listIterator, permutations, remove, remove, removeAll, removeIf, replaceAll, retainAll, set, sort, toArray, toArrayspliteratorparallelStream, streamcastFromList, castFromSortedMap, castFromSortedSet, equalconcat, drop, dropWhile, filter, flatMap, fold, foldUntil, hash, head, map, precat, take, takeWhile, toStringtoImList, toImMap, toImRrbt, toImSet, toImSortedMap, toImSortedSet, toMutableList, toMutableMap, toMutableRrbt, toMutableSet, toMutableSortedMap, toMutableSortedSetpublic static RangeOfInt of(Number s, Number e)
public static RangeOfInt of(Number e)
public boolean contains(int i)
public boolean contains(Object o)
contains in interface Collection<Integer>contains in interface List<Integer>contains in interface UnmodList<Integer>o - an Integer, Long, BigInteger, or String that parses as a signed decimal Integer.IllegalArgumentException - if the argument is not an Integer, Long, BigInteger, or
String.NumberFormatException - if a String argument cannot be parsed using Integer.valueOf().public int indexOf(Object o)
public int lastIndexOf(Object o)
lastIndexOf in interface List<Integer>lastIndexOf in interface UnmodList<Integer>public int size()
Sizedpublic int hashCode()
public boolean equals(Object other)
public UnmodListIterator<Integer> listIterator(int startIdx)
listIterator in interface List<Integer>listIterator in interface UnmodList<Integer>Copyright © 2019. All rights reserved.