| 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 |
ShortBinarySearch.binarySearch(IShortList list,
short key,
int lower,
int upper)
Searches the specified list for the specified object using the binary search algorithm.
|
static <E> void |
ShortMergeSort.sort(IShortList list) |
static <E> void |
ShortMergeSort.sort(IShortList list,
int from,
int to) |
| Modifier and Type | Class and Description |
|---|---|
class |
ShortBigList
ShortBigList is a list optimized for storing large number of elements.
|
class |
ShortGapList
ShortGapList combines the strengths of both ArrayList and LinkedList.
|
| Modifier and Type | Method and Description |
|---|---|
IShortList |
IShortList.copy()
Returns a shallow copy of this list instance.
|
IShortList |
ShortGapList.doCreate(int capacity) |
IShortList |
IShortList.extract(int index,
int len)
Removes specified range of elements from list and return them.
|
IShortList |
IShortList.extractWhere(IPredicate predicate)
Removes and returns all elements in the list which match the predicate.
|
IShortList |
IShortList.getAll(int index,
int len)
Returns specified range of elements from list.
|
IShortList |
IShortList.getAll(short elem)
Returns all elements in the list equal to the specified element.
|
IShortList |
IShortList.getWhere(IPredicate predicate)
Returns all elements in the list which match the predicate.
|
static IShortList |
ShortBigList.of(java.util.List<java.lang.Short> values) |
static IShortList |
ShortBigList.of(short[] values) |
static IShortList |
ShortBigList.of(java.lang.Short[] values) |
IShortList |
IShortList.removeAll(short elem)
Removes all equal elements.
|
abstract IShortList |
IShortList.unmodifiableList()
Returns an unmodifiable view of this list.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
IShortList.addAll(int index,
IShortList list)
Inserts all of the elements in the specified list into this
list, starting at the specified position.
|
boolean |
IShortList.addAll(IShortList list)
Adds all of the elements in the specified list into this list.
|
void |
IShortList.initAll(IShortList list)
Initializes the list so it will afterwards only contain the elements of the collection.
|
void |
IShortList.putAll(int index,
IShortList list)
Set or add the specified elements.
|
boolean |
IShortList.removeAll(IShortList coll) |
void |
IShortList.replaceAll(int index,
int len,
IShortList list)
Replaces the specified range with new elements.
|
boolean |
IShortList.retainAll(IShortList coll) |
void |
IShortList.setAll(int index,
IShortList list)
Sets the specified elements.
|
static void |
IShortList.transferCopy(IShortList src,
int srcIndex,
int srcLen,
IShortList dst,
int dstIndex,
int dstLen)
Copies elements from one list to another.
|
static void |
IShortList.transferMove(IShortList src,
int srcIndex,
int srcLen,
IShortList dst,
int dstIndex,
int dstLen)
Moves elements from one list to another by setting it to null in the source list.
|
static void |
IShortList.transferRemove(IShortList src,
int srcIndex,
int srcLen,
IShortList dst,
int dstIndex,
int dstLen)
Moves elements from one list to another by removing it from the source list.
|
static void |
IShortList.transferSwap(IShortList src,
int srcIndex,
IShortList dst,
int dstIndex,
int len)
Swaps elements from two lists.
|