Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ jobs:
gradle-version: 8.13
- name: Publish
run: gradle publishAllPublicationsToMinecrafttasMainRepository -Prelease=true -PminecrafttasMainUsername=${{ secrets.MAVEN_NAME }} -PminecrafttasMainPassword=${{ secrets.MAVEN_SECRET }}
- name: Upload assets
uses: softprops/action-gh-release@v2
with:
files: 'build/libs/!(-@(dev|sources|javadoc|all)).jar'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ bin

build/
bin/
memory/
memory/
docs/
16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,20 @@ A BigArrayList is basically an ArrayList that can handle a much larger amount of
3. Removing elements from the list
4. Sorting the list

## Installation
BigArrayList is available under [maven.minecrafttas.com](https://maven.minecrafttas.com/#/main/com/dselent/bigarraylist).

The basic build.gradle configuration should look like this:
```groovy
repositories {
maven { url = "https://maven.minecrafttas.com/main" }
}

dependencies {
implementation "com.dselent:bigarraylist:1.4"
}
```

## BigArrayList Size

The number of elements a BigArrayList can hold is 2^63-1 elements. This number is currently considered a theoretical limit, since it would take too much time and space to store that many elements. A more practical limit would be based on the combination of available RAM and disk space because the amount of space will likely be the limiting factor.
Expand Down Expand Up @@ -69,4 +83,4 @@ Some types of serialization will clear the contents on disk automatically when y
You should treat storing any element retrieved from a BigArrayList as if it were a copy-by-value. The reason for this is because the content in a BigArrayList can be serialized and deserialized during any operation. Therefore, upon deserialization, a new object is created. Any old references in the program are now referencing a different object than what is being stored in the BigArrayList. If you retrieve an element from a BigArrayList and change it, make sure to save it back to the list.

## How to Build
Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build.
Import normally as a Gradle project. The SimpleTest.java file can be run as a standard Java application to test the build.
17 changes: 15 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@

plugins {
id 'java'
id 'java-gradle-plugin'
id 'java'
id 'maven-publish'
}

Expand Down Expand Up @@ -32,6 +31,14 @@ java {
withJavadocJar()
}

sourceSets {
main {
java {
exclude 'examples/**'
}
}
}

publishing {
repositories {
maven {
Expand All @@ -51,4 +58,10 @@ publishing {
}
}
}
publications {
maven(MavenPublication) {
artifactId = "bigarraylist"
from components.java
}
}
}
2 changes: 2 additions & 0 deletions src/test/java/BigArrayListTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.dselent.bigarraylist.BigArrayList;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
Expand Down Expand Up @@ -56,6 +57,7 @@ protected void tearDown() throws Exception
* Monte-carlo test case. Tests random operations on BigArrayLists with parameters randomized within ranges.
*/
@Test
@Disabled
public void testBigArrayList()
{
for(int i=0; i<testRuns; i++)
Expand Down