Compare commits
11 Commits
advanced_d
...
master
Author | SHA1 | Date |
---|---|---|
Speiger | afdd27648e | |
Speiger | 7e475b5472 | |
Speiger | e65fde736b | |
Speiger | bf0b4172de | |
Speiger | 961b47a58c | |
Speiger | 330be87338 | |
Speiger | 4b30ce12c9 | |
Speiger | 0be7dba5d3 | |
Speiger | 6eaa992f5f | |
Speiger | 9b23d713ff | |
Speiger | 85d230c561 |
16
Changelog.md
16
Changelog.md
|
@ -1,5 +1,21 @@
|
||||||
# Changelog of versions
|
# Changelog of versions
|
||||||
|
|
||||||
|
### Version 0.9.0
|
||||||
|
- Added: getFirst/getLast/removeFirst/removeLast to List.class.
|
||||||
|
- Added: Dedicated Set toArray implementations.
|
||||||
|
- Added: ToArray/pushTop functions to Stack.class.
|
||||||
|
- Added: ComputeNonDefault functions which will contain the current behavior of the Compute function, while the Compute will be changed to be more java compliant!
|
||||||
|
- Added: List.reversed, which returns a SubList that has all elements in reversed order and also inserts reversed.
|
||||||
|
- Added: Iterators.infinite as an option that will create a Infinite Iterator based on the inputed one.
|
||||||
|
- Added: List.indexedIterator which allows you to create a iterator with a customized iteration indecies. Useful if you want to transform lists output.
|
||||||
|
- Added: PriorityQueue.contains is now a function
|
||||||
|
- Added: Iterators/Async Builders now support MapToPrimitiveType function on the object variant. So more processing can be done. (Will be expanded upon later versions)
|
||||||
|
- Fixed: SetValue wasn't working on forEach implementations.
|
||||||
|
- Fixed: Compute functions now perform with primitives more java compliant. Meaning that getDefaultReturnValue function no longer is seen as null.
|
||||||
|
- Fixed: Supplier was using the wrong dataType in their function name.
|
||||||
|
- Updated: SimpleCodeGenerator 1.3.0 is now being used which allows for iterative code support.
|
||||||
|
- Breaking Change: Map.compute/IfAbsent/Present and Map.supplyIfAbsent if the value is a primitive it will no longer accept the defaultReturnValue() as "null" if that functionality is desired then use: computeNonDefault which contains the functionality!
|
||||||
|
|
||||||
### Version 0.8.1
|
### Version 0.8.1
|
||||||
- Added: getFirst/getLast/removeFirst/removeLast to List.class.
|
- Added: getFirst/getLast/removeFirst/removeLast to List.class.
|
||||||
- Added: Dedicated Set toArray implementations.
|
- Added: Dedicated Set toArray implementations.
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,5 +1,6 @@
|
||||||
![build](https://github.com/Speiger/Primitive-Collections/actions/workflows/build_action.yml/badge.svg)
|
![build](https://github.com/Speiger/Primitive-Collections/actions/workflows/build_action.yml/badge.svg)
|
||||||
[![Latest Release](https://jitpack.io/v/Speiger/Primitive-Collections.svg)](https://jitpack.io/#Speiger/Primitive-Collections)
|
[![Latest Release](https://jitpack.io/v/Speiger/Primitive-Collections.svg)](https://jitpack.io/#Speiger/Primitive-Collections)
|
||||||
|
![Maven Central Version](https://img.shields.io/maven-central/v/io.github.speiger/Primitive-Collections)
|
||||||
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
|
[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
|
||||||
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Speiger/Primitive-Collections)
|
![GitHub commit activity](https://img.shields.io/github/commit-activity/m/Speiger/Primitive-Collections)
|
||||||
![Unit Tests](https://github.com/Speiger/Primitive-Collections/actions/workflows/build_tests_action.yml/badge.svg)
|
![Unit Tests](https://github.com/Speiger/Primitive-Collections/actions/workflows/build_tests_action.yml/badge.svg)
|
||||||
|
@ -43,7 +44,7 @@ To ensure that problems can be dealt with even if it is breaking the current API
|
||||||
|
|
||||||
# How to install
|
# How to install
|
||||||
Using Jitpack Gradle
|
Using Jitpack Gradle
|
||||||
```gradle
|
```groovy
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
url = "https://jitpack.io"
|
url = "https://jitpack.io"
|
||||||
|
@ -54,6 +55,13 @@ dependencies {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Using Maven Central
|
||||||
|
```groovy
|
||||||
|
dependencies {
|
||||||
|
implementation 'io.github.speiger:Primitive-Collections:0.9.0'
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
# SourceCode
|
# SourceCode
|
||||||
The generated Sourcecode can be automatically build,
|
The generated Sourcecode can be automatically build,
|
||||||
but if you want to just browse around in it.
|
but if you want to just browse around in it.
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
# Security Policy
|
||||||
|
|
||||||
|
## Supported Versions
|
||||||
|
|
||||||
|
Due to how the releases work, only the latest versions will be supported.
|
||||||
|
|
||||||
|
## Reporting a Vulnerability
|
||||||
|
|
||||||
|
If you have discovered a security vulnerability in this project, please report it privately.
|
||||||
|
**Please refrain from posting in public issues.**
|
||||||
|
This gives me time to process issues that are being found, and reduces the possiblity of abuse while patches are being created.
|
||||||
|
Please disclose it [here](https://github.com/Speiger/Primitive-Collections/security/advisories/new).
|
||||||
|
|
||||||
|
Please consider that this project is developed by a single person.
|
||||||
|
So please provide a reasonable timeframe when reporting.
|
108
build.gradle
108
build.gradle
|
@ -1,6 +1,7 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id "jacoco"
|
id "jacoco"
|
||||||
|
// id "com.vanniktech.maven.publish" version "0.28.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
|
@ -10,6 +11,7 @@ tasks.withType(JavaCompile) {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
apply plugin: 'eclipse'
|
apply plugin: 'eclipse'
|
||||||
apply plugin: 'maven-publish'
|
apply plugin: 'maven-publish'
|
||||||
|
apply plugin: 'signing'
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
|
@ -19,12 +21,17 @@ repositories {
|
||||||
}
|
}
|
||||||
|
|
||||||
archivesBaseName = 'Primitive Collections'
|
archivesBaseName = 'Primitive Collections'
|
||||||
version = '0.9.0';
|
version = RELEASE_VERSION;
|
||||||
|
|
||||||
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.current();
|
sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = JavaVersion.current();
|
||||||
|
|
||||||
System.out.println("Java Version: "+compileJava.sourceCompatibility)
|
System.out.println("Java Version: "+compileJava.sourceCompatibility)
|
||||||
|
|
||||||
|
java {
|
||||||
|
withJavadocJar()
|
||||||
|
withSourcesJar()
|
||||||
|
}
|
||||||
|
|
||||||
javadoc {
|
javadoc {
|
||||||
options.tags = [ "implSpec", "note" ]
|
options.tags = [ "implSpec", "note" ]
|
||||||
}
|
}
|
||||||
|
@ -99,26 +106,12 @@ task generateLimitSource(type: JavaExec) {
|
||||||
args = ['silent', 'load']
|
args = ['silent', 'load']
|
||||||
}
|
}
|
||||||
|
|
||||||
task javadocJar(type: Jar) {
|
|
||||||
from javadoc
|
|
||||||
archiveClassifier = 'javadoc'
|
|
||||||
}
|
|
||||||
|
|
||||||
task srcJar(type: Jar) {
|
|
||||||
from sourceSets.main.allSource
|
|
||||||
archiveClassifier = 'sources'
|
|
||||||
}
|
|
||||||
|
|
||||||
compileJava.dependsOn generateGithubSource
|
compileJava.dependsOn generateGithubSource
|
||||||
|
|
||||||
javadoc.failOnError = false
|
javadoc.failOnError = false
|
||||||
javadoc.options.memberLevel = JavadocMemberLevel.PUBLIC
|
javadoc.options.memberLevel = JavadocMemberLevel.PUBLIC
|
||||||
javadoc.options.quiet()
|
javadoc.options.quiet()
|
||||||
|
|
||||||
artifacts {
|
|
||||||
archives javadocJar
|
|
||||||
archives srcJar
|
|
||||||
}
|
|
||||||
|
|
||||||
task testBooleans(type: Test) {
|
task testBooleans(type: Test) {
|
||||||
group 'tests'
|
group 'tests'
|
||||||
|
@ -268,13 +261,10 @@ jacocoTestReport {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
publishing {
|
publishing {
|
||||||
Properties props = new Properties()
|
|
||||||
if(file("$buildDir/credentials.properties").exists()) {
|
|
||||||
props.load(new FileInputStream("$buildDir/credentials.properties"))
|
|
||||||
}
|
|
||||||
publications {
|
publications {
|
||||||
mavenJava(MavenPublication) {
|
personal(MavenPublication) {
|
||||||
pom {
|
pom {
|
||||||
name = 'Primitive Collections'
|
name = 'Primitive Collections'
|
||||||
description = 'A Primitive Collection library that reduces memory usage and improves performance'
|
description = 'A Primitive Collection library that reduces memory usage and improves performance'
|
||||||
|
@ -283,8 +273,6 @@ publishing {
|
||||||
artifactId = project.archivesBaseName.replace(" ", "-")
|
artifactId = project.archivesBaseName.replace(" ", "-")
|
||||||
groupId = 'de.speiger'
|
groupId = 'de.speiger'
|
||||||
from components.java
|
from components.java
|
||||||
artifact tasks.srcJar
|
|
||||||
artifact tasks.javadocJar
|
|
||||||
licenses {
|
licenses {
|
||||||
license {
|
license {
|
||||||
name = 'The Apache License, Version 2.0'
|
name = 'The Apache License, Version 2.0'
|
||||||
|
@ -309,11 +297,83 @@ publishing {
|
||||||
}
|
}
|
||||||
repositories {
|
repositories {
|
||||||
maven {
|
maven {
|
||||||
|
name = "Speiger_Maven"
|
||||||
|
def auth = System.getenv("Speiger_Maven_Auth")?.split(';');
|
||||||
url version.endsWith('SNAPSHOT') ? "https://maven.speiger.com/repository/debug" : "https://maven.speiger.com/repository/main"
|
url version.endsWith('SNAPSHOT') ? "https://maven.speiger.com/repository/debug" : "https://maven.speiger.com/repository/main"
|
||||||
credentials(PasswordCredentials) {
|
credentials(PasswordCredentials) {
|
||||||
username props.mavenUser
|
username auth?[0]
|
||||||
password props.mavenPassword
|
password auth?[1]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
tasks.withType(PublishToMavenRepository) {
|
||||||
|
def predicate = provider {
|
||||||
|
(repository == publishing.repositories.mavenCentral && publication == publishing.publications.maven) ||
|
||||||
|
(repository != publishing.repositories.mavenCentral && publication != publishing.publications.maven)
|
||||||
|
}
|
||||||
|
onlyIf("publishing binary to the external repository, or binary and sources to the internal one") {
|
||||||
|
predicate.get()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tasks.withType(PublishToMavenLocal) {
|
||||||
|
def predicate = provider {
|
||||||
|
publication == publishing.publications.personal
|
||||||
|
}
|
||||||
|
onlyIf("publishing binary and sources") {
|
||||||
|
predicate.get()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Maven central Start
|
||||||
|
//Disabling due to java8 incompat, only needed to manually publishing anyways
|
||||||
|
|
||||||
|
//signing.useGpgCmd()
|
||||||
|
//
|
||||||
|
//import com.vanniktech.maven.publish.SonatypeHost
|
||||||
|
//import com.vanniktech.maven.publish.JavaLibrary
|
||||||
|
//import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
//
|
||||||
|
//mavenPublishing {
|
||||||
|
// configure(new JavaLibrary(new JavadocJar.None(), true))
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//mavenPublishing {
|
||||||
|
// publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
||||||
|
//
|
||||||
|
// signAllPublications()
|
||||||
|
// pom {
|
||||||
|
// name = 'Primitive Collections'
|
||||||
|
// description = 'A Primitive Collection library that reduces memory usage and improves performance'
|
||||||
|
// url = 'https://github.com/Speiger/Primitive-Collections'
|
||||||
|
// version = project.version
|
||||||
|
// group = 'io.github.speiger'
|
||||||
|
// licenses {
|
||||||
|
// license {
|
||||||
|
// name = 'The Apache License, Version 2.0'
|
||||||
|
// url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// developers {
|
||||||
|
// developer {
|
||||||
|
// id = 'speiger'
|
||||||
|
// name = 'Speiger'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// scm {
|
||||||
|
// connection = 'scm:git:git://github.com/Speiger/Primitive-Collections.git'
|
||||||
|
// developerConnection = 'scm:git:ssh://github.com:Speiger/Primitive-Collections.git'
|
||||||
|
// url = 'https://github.com/Speiger/Primitive-Collections'
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// issueManagement {
|
||||||
|
// system = 'github'
|
||||||
|
// url = 'https://github.com/Speiger/Primitive-Collections/issues'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
//
|
|
@ -1,4 +1,6 @@
|
||||||
org.gradle.jvmargs=-Xmx3G
|
org.gradle.jvmargs=-Xmx3G
|
||||||
|
|
||||||
maxMemory = 1024m
|
maxMemory = 1024m
|
||||||
testThreads = 2
|
testThreads = 4
|
||||||
|
|
||||||
|
RELEASE_VERSION = 0.9.0
|
|
@ -342,6 +342,8 @@ public class ITERABLES
|
||||||
#argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction
|
#argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction
|
||||||
#argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble
|
#argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble
|
||||||
#argument DATA_TYPE Boolean Byte Short Int Long Float Double
|
#argument DATA_TYPE Boolean Byte Short Int Long Float Double
|
||||||
|
#argument FILTER_TYPE BOOLEAN_COLLECTION_MODULE BYTE_COLLECTION_MODULE SHORT_COLLECTION_MODULE INT_COLLECTION_MODULE LONG_COLLECTION_MODULE FLOAT_COLLECTION_MODULE DOUBLE_COLLECTION_MODULE
|
||||||
|
#if FILTER_TYPE
|
||||||
private static class MAPPED_TYPEIterable<E> implements OUTPUT_ITERABLE, ISizeProvider
|
private static class MAPPED_TYPEIterable<E> implements OUTPUT_ITERABLE, ISizeProvider
|
||||||
{
|
{
|
||||||
ITERABLE KEY_SPECIAL_GENERIC_TYPE<E> iterable;
|
ITERABLE KEY_SPECIAL_GENERIC_TYPE<E> iterable;
|
||||||
|
@ -369,6 +371,7 @@ public class ITERABLES
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
#enditerate
|
#enditerate
|
||||||
#endif
|
#endif
|
||||||
private static class MappedIterable KSS_GENERIC_TYPE<E, T> implements ObjectIterable<T>, ISizeProvider
|
private static class MappedIterable KSS_GENERIC_TYPE<E, T> implements ObjectIterable<T>, ISizeProvider
|
||||||
|
|
|
@ -925,6 +925,8 @@ public class ITERATORS
|
||||||
#argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction
|
#argument MAPPER Predicate ToByteFunction ToShortFunction ToIntFunction ToLongFunction ToFloatFunction ToDoubleFunction
|
||||||
#argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble
|
#argument APPLY test applyAsByte applyAsShort applyAsInt applyAsLong applyAsFloat applyAsDouble
|
||||||
#argument DATA_TYPE boolean byte short int long float double
|
#argument DATA_TYPE boolean byte short int long float double
|
||||||
|
#argument FILTER_TYPE BOOLEAN_COLLECTION_MODULE BYTE_COLLECTION_MODULE SHORT_COLLECTION_MODULE INT_COLLECTION_MODULE LONG_COLLECTION_MODULE FLOAT_COLLECTION_MODULE DOUBLE_COLLECTION_MODULE
|
||||||
|
#if FILTER_TYPE
|
||||||
private static class MAPPED_TYPEIterator<E> implements OUTPUT_ITERATOR
|
private static class MAPPED_TYPEIterator<E> implements OUTPUT_ITERATOR
|
||||||
{
|
{
|
||||||
ITERATOR<E> iterator;
|
ITERATOR<E> iterator;
|
||||||
|
@ -951,6 +953,7 @@ public class ITERATORS
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
#enditerate
|
#enditerate
|
||||||
#endif
|
#endif
|
||||||
private static class FlatMappedIterator KSS_GENERIC_TYPE<E, T,[SPACE]V extends Iterable<T>> implements ObjectIterator<T>
|
private static class FlatMappedIterator KSS_GENERIC_TYPE<E, T,[SPACE]V extends Iterable<T>> implements ObjectIterator<T>
|
||||||
|
|
Loading…
Reference in New Issue