N
- specifies the indexing class for the receiverpublic class Extent<N extends java.lang.Number>
extends java.lang.Object
implements java.lang.Iterable<N>
Instances of this class are immutable.
Modifier and Type | Method and Description |
---|---|
static <N extends java.lang.Number> |
create(N start,
N end)
Creates extent of numbers between start and end values inclusively.
|
static <N extends java.lang.Number> |
createUnchecked(N start,
N end)
Creates extent of numbers between start and end values inclusively
without arguments checking.
|
boolean |
equals(java.lang.Object obj) |
static <N extends java.lang.Number> |
extentIterator(java.util.Collection<N> coll)
Returns extent iterator for the given collection of numbers.
|
N |
getEnd()
Returns the last index of the range of items.
|
N |
getStart()
Returns first index of the range of items.
|
int |
hashCode() |
java.util.Iterator<N> |
iterator() |
static <N extends java.lang.Number> |
numberIterator(pl.netanel.swt.matrix.Math<N> math,
java.util.List<pl.netanel.swt.matrix.MutableExtent<N>> items) |
java.lang.String |
toString() |
public static <N extends java.lang.Number> Extent<N> create(N start, N end)
start
and end
numbers are item indexes in the model,
not the visual position of the item on the screen
which can be altered by move and hide operations.
start
- first index of the range of itemsend
- last index of the range of itemsjava.lang.IllegalArgumentException
- if start or end is null
java.lang.IllegalArgumentException
- if start is greater then endjava.lang.IndexOutOfBoundsException
- if start or end is negativepublic static <N extends java.lang.Number> Extent<N> createUnchecked(N start, N end)
start
and end
numbers are item indexes in the model,
not the visual position of the item on the screen
which can be altered by move and hide operations.
start
- first index of the range of itemsend
- last index of the range of itemspublic N getStart()
public N getEnd()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Iterator<N> iterator()
iterator
in interface java.lang.Iterable<N extends java.lang.Number>
public static <N extends java.lang.Number> java.util.Iterator<Extent<N>> extentIterator(java.util.Collection<N> coll)
coll
- public static <N extends java.lang.Number> java.util.Iterator<N> numberIterator(pl.netanel.swt.matrix.Math<N> math, java.util.List<pl.netanel.swt.matrix.MutableExtent<N>> items)
Copyright © 2011 netanel.pl. All Rights Reserved.