public interface Sortable
Sort
Modifier and Type | Method and Description |
---|---|
Ordered |
fetch(int index,
Ordered reuse)
Fetch the object at the given index.
|
int |
first()
Returns the first index of the Sortable.
|
int |
last()
Returns the last index of the Sortable.
|
void |
swap(int i,
int j)
Swaps the elements at the given indicies.
|
int first()
int last()
Ordered fetch(int index, Ordered reuse)
index
- The item number to get.reuse
- If this argument is not null, it is an object
acquired from a previous fetch that is no longer needed and
may be returned as the result if it makes mores sense to alter
and return it than to fetch or create a new element. That is, the
reuse object is garbage and may be used to avoid allocating a new
object if that would normally be the strategy.void swap(int i, int j)
i
- One index.j
- The other index.HTML Parser is an open source library released under LGPL.