Update 'README.md'

This commit is contained in:
2022-08-22 18:02:18 +00:00
parent 58891020e8
commit 88808edf01

View File

@@ -1,19 +1,11 @@
Java collections for primitives (currently only int) released under [MIT](https://opensource.org/licenses/MIT) license.
*IntList* and *LongList* are implementations of lists that store primitive integers/longs. The ints/longs are stored in an int/long array and the class takes care of growing the array as needed. You can trim the list to reduce the memory overhead. No dependencies.
*IntList* and *LongList* are implementations of lists that store primitive integers/longs. The ints/longs are stored in an int/long array and the class takes care of growing the array as needed. You can trim the list to reduce the memory overhead. The feature that separates this implementation from others is that the lists keep track of whether they are sorted. This enables powerfull optimizations for searching, union or retain operations.
The lists support the following operations:
*LongLongHashMap* and *LongObjHashMap* are maps that use primitive longs as keys.
*Sparse2DLongArray* is a memory efficient alternative to *long[][]*. In contrast to *long[][]* the indices are signed longs, which allows you to have negative keys and keys > 2^31.
* add/remove elements via single and bulk operations
* replace elements
* sort and shuffle
* the lists know whether or not they are sorted and can leverage that knowledge for searching (binary search), union and intersection
* search for elements
* union, intersection, retainIf, retainAll removeIf, removeAll
* clear and trim are separate methods, so that the list can be re-used without having to re-allocate memory
* stream support
* the lists are serializable and cloneable
* the lists are **not** thread-safe
# How to use
The library is still considered beta. There no pre-build artifacts on Maven Central or JCenter, but you can download them from repo.lucares.org.
@@ -23,7 +15,7 @@ Example for Gradle:
```groovy
apply plugin: 'maven'
repositories {
maven { url 'https://repo.lucares.org/' }
maven { url 'https://repo.lucares.de/' }
}
dependencies {
compile 'org.lucares:primitiveCollections:0.3'