| Package | Description |
|---|---|
| org.magicwerk.brownies.collections.helper.primitive |
This packages contains helper classes for the package org.magicwerk.brownies.collections.primitive:
- binary search for primitive arrays - merge sort for primitive arrays |
| org.magicwerk.brownies.collections.primitive |
This packages contains implementations of GapList and BigList for primitive data types.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
IntBinarySearch.binarySearch(IIntList list,
int key,
int lower,
int upper)
Searches the specified list for the specified object using the binary search algorithm.
|
static <E> void |
IntMergeSort.sort(IIntList list) |
static <E> void |
IntMergeSort.sort(IIntList list,
int from,
int to) |
| Modifier and Type | Class and Description |
|---|---|
class |
IntBigList
IntBigList is a list optimized for storing large number of elements.
|
class |
IntGapList
IntGapList combines the strengths of both ArrayList and LinkedList.
|
| Modifier and Type | Method and Description |
|---|---|
IIntList |
IIntList.copy()
Returns a shallow copy of this list instance.
|
IIntList |
IntGapList.doCreate(int capacity) |
IIntList |
IIntList.extract(int index,
int len)
Removes specified range of elements from list and return them.
|
IIntList |
IIntList.extractWhere(IPredicate predicate)
Removes and returns all elements in the list which match the predicate.
|
IIntList |
IIntList.getAll(int elem)
Returns all elements in the list equal to the specified element.
|
IIntList |
IIntList.getAll(int index,
int len)
Returns specified range of elements from list.
|
IIntList |
IIntList.getWhere(IPredicate predicate)
Returns all elements in the list which match the predicate.
|
static IIntList |
IntBigList.of(int[] values) |
static IIntList |
IntBigList.of(java.lang.Integer[] values) |
static IIntList |
IntBigList.of(java.util.List<java.lang.Integer> values) |
IIntList |
IIntList.removeAll(int elem)
Removes all equal elements.
|
abstract IIntList |
IIntList.unmodifiableList()
Returns an unmodifiable view of this list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
IIntList.addAll(IIntList list)
Adds all of the elements in the specified list into this list.
|
boolean |
IIntList.addAll(int index,
IIntList list)
Inserts all of the elements in the specified list into this
list, starting at the specified position.
|
void |
IIntList.initAll(IIntList list)
Initializes the list so it will afterwards only contain the elements of the collection.
|
void |
IIntList.putAll(int index,
IIntList list)
Set or add the specified elements.
|
boolean |
IIntList.removeAll(IIntList coll) |
void |
IIntList.replaceAll(int index,
int len,
IIntList list)
Replaces the specified range with new elements.
|
boolean |
IIntList.retainAll(IIntList coll) |
void |
IIntList.setAll(int index,
IIntList list)
Sets the specified elements.
|
static void |
IIntList.transferCopy(IIntList src,
int srcIndex,
int srcLen,
IIntList dst,
int dstIndex,
int dstLen)
Copies elements from one list to another.
|
static void |
IIntList.transferMove(IIntList src,
int srcIndex,
int srcLen,
IIntList dst,
int dstIndex,
int dstLen)
Moves elements from one list to another by setting it to null in the source list.
|
static void |
IIntList.transferRemove(IIntList src,
int srcIndex,
int srcLen,
IIntList dst,
int dstIndex,
int dstLen)
Moves elements from one list to another by removing it from the source list.
|
static void |
IIntList.transferSwap(IIntList src,
int srcIndex,
IIntList dst,
int dstIndex,
int len)
Swaps elements from two lists.
|