Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3bff703d91 | ||
|
|
d140aaa788 | ||
|
|
180b603ffd | ||
|
|
2306917b10 | ||
|
|
075f3ad183 | ||
|
|
363160441d |
@@ -1,5 +1,23 @@
|
|||||||
# Changelog of versions
|
# Changelog of versions
|
||||||
|
|
||||||
|
### Version 1.0.1
|
||||||
|
-Added: AsyncBuilder now supports CompletableFuture
|
||||||
|
-Added: forEach(BiConsumer, Input)
|
||||||
|
|
||||||
|
|
||||||
|
### Version 1.0.0
|
||||||
|
-Added: Sequenced Collections support.
|
||||||
|
-Added: ReferenceMaps
|
||||||
|
-Added: IndirectSorting
|
||||||
|
-Added: Missing Optionals
|
||||||
|
-Added: Collectors for Lists and Sets
|
||||||
|
-Added: ReverseCollections for Sequenced/OrderedCollections
|
||||||
|
-Breaking Change: FindFirst & reduce without identity use now Optionals instead of defaultValues
|
||||||
|
-Breaking Change: Lists and OrderedSets no longer use Poll prefix they use now the java Remove
|
||||||
|
-Fixed: #33
|
||||||
|
-Fixed: Add/PutAndMoveToFirst wouldn't work if the collection was only with 1 entry present.
|
||||||
|
-Fixed: Various new bugs found with the expansion of the unit tests.
|
||||||
|
|
||||||
### Version 0.9.0
|
### Version 0.9.0
|
||||||
- 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.
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ Such as pruning classes that are not needed in your code.
|
|||||||
- HashSets/Maps (Linked & HashControl)
|
- HashSets/Maps (Linked & HashControl)
|
||||||
- TreeSets/Maps (RB & AVL)
|
- TreeSets/Maps (RB & AVL)
|
||||||
- EnumMaps
|
- EnumMaps
|
||||||
|
- ReferenceMaps (Weak Keys)
|
||||||
- Immutable Maps/Lists/Sets
|
- Immutable Maps/Lists/Sets
|
||||||
- ConcurrentHashMaps
|
- ConcurrentHashMaps
|
||||||
- Priority Queues
|
- Priority Queues
|
||||||
@@ -51,14 +52,14 @@ repositories {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.github.Speiger:Primitive-Collections:0.9.0'
|
implementation 'com.github.Speiger:Primitive-Collections:1.0.0'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
Using Maven Central
|
Using Maven Central
|
||||||
```groovy
|
```groovy
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'io.github.speiger:Primitive-Collections:0.9.0'
|
implementation 'io.github.speiger:Primitive-Collections:1.0.0'
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+47
-47
@@ -1,7 +1,7 @@
|
|||||||
plugins {
|
plugins {
|
||||||
id 'java-library'
|
id 'java-library'
|
||||||
id "jacoco"
|
id "jacoco"
|
||||||
id "com.vanniktech.maven.publish" version "0.28.0"
|
// id "com.vanniktech.maven.publish" version "0.28.0"
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.withType(JavaCompile) {
|
tasks.withType(JavaCompile) {
|
||||||
@@ -332,49 +332,49 @@ tasks.withType(PublishToMavenLocal) {
|
|||||||
//Maven central Start
|
//Maven central Start
|
||||||
//Disabling due to java8 incompat, only needed to manually publishing anyways
|
//Disabling due to java8 incompat, only needed to manually publishing anyways
|
||||||
|
|
||||||
signing.useGpgCmd()
|
//signing.useGpgCmd()
|
||||||
|
//
|
||||||
import com.vanniktech.maven.publish.SonatypeHost
|
//import com.vanniktech.maven.publish.SonatypeHost
|
||||||
import com.vanniktech.maven.publish.JavaLibrary
|
//import com.vanniktech.maven.publish.JavaLibrary
|
||||||
import com.vanniktech.maven.publish.JavadocJar
|
//import com.vanniktech.maven.publish.JavadocJar
|
||||||
|
//
|
||||||
mavenPublishing {
|
//mavenPublishing {
|
||||||
configure(new JavaLibrary(new JavadocJar.None(), true))
|
// configure(new JavaLibrary(new JavadocJar.None(), true))
|
||||||
}
|
//}
|
||||||
|
//
|
||||||
mavenPublishing {
|
//mavenPublishing {
|
||||||
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
// publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL)
|
||||||
|
//
|
||||||
signAllPublications()
|
// signAllPublications()
|
||||||
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'
|
||||||
url = 'https://github.com/Speiger/Primitive-Collections'
|
// url = 'https://github.com/Speiger/Primitive-Collections'
|
||||||
version = project.version
|
// version = project.version
|
||||||
group = 'io.github.speiger'
|
// group = 'io.github.speiger'
|
||||||
licenses {
|
// licenses {
|
||||||
license {
|
// license {
|
||||||
name = 'The Apache License, Version 2.0'
|
// name = 'The Apache License, Version 2.0'
|
||||||
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
// url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
developers {
|
// developers {
|
||||||
developer {
|
// developer {
|
||||||
id = 'speiger'
|
// id = 'speiger'
|
||||||
name = 'Speiger'
|
// name = 'Speiger'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
scm {
|
// scm {
|
||||||
connection = 'scm:git:git://github.com/Speiger/Primitive-Collections.git'
|
// connection = 'scm:git:git://github.com/Speiger/Primitive-Collections.git'
|
||||||
developerConnection = 'scm:git:ssh://github.com:Speiger/Primitive-Collections.git'
|
// developerConnection = 'scm:git:ssh://github.com:Speiger/Primitive-Collections.git'
|
||||||
url = 'https://github.com/Speiger/Primitive-Collections'
|
// url = 'https://github.com/Speiger/Primitive-Collections'
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
issueManagement {
|
// issueManagement {
|
||||||
system = 'github'
|
// system = 'github'
|
||||||
url = 'https://github.com/Speiger/Primitive-Collections/issues'
|
// url = 'https://github.com/Speiger/Primitive-Collections/issues'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
+1
-1
@@ -3,4 +3,4 @@ org.gradle.jvmargs=-Xmx3G
|
|||||||
maxMemory = 2048m
|
maxMemory = 2048m
|
||||||
testThreads = 4
|
testThreads = 4
|
||||||
|
|
||||||
RELEASE_VERSION = 1.0.0
|
RELEASE_VERSION = 1.0.1
|
||||||
@@ -79,6 +79,7 @@ public class FunctionModule extends BaseModule
|
|||||||
addBiClassMapper("BI_CONSUMER", "Consumer", "");
|
addBiClassMapper("BI_CONSUMER", "Consumer", "");
|
||||||
addClassMapper("BI_TO_OBJECT_CONSUMER", "ObjectConsumer");
|
addClassMapper("BI_TO_OBJECT_CONSUMER", "ObjectConsumer");
|
||||||
addAbstractMapper("BI_FROM_OBJECT_CONSUMER", "Object%sConsumer");
|
addAbstractMapper("BI_FROM_OBJECT_CONSUMER", "Object%sConsumer");
|
||||||
|
addAbstractMapper("BI_TO_OBJECT_CONSUMER", "%sObjectConsumer");
|
||||||
addAbstractMapper("BI_FROM_INT_CONSUMER", "Int%sConsumer");
|
addAbstractMapper("BI_FROM_INT_CONSUMER", "Int%sConsumer");
|
||||||
if(keyType.isObject()) {
|
if(keyType.isObject()) {
|
||||||
addSimpleMapper("TO_OBJECT_FUNCTION", keyType.getNonFileType()+"UnaryOperator");
|
addSimpleMapper("TO_OBJECT_FUNCTION", keyType.getNonFileType()+"UnaryOperator");
|
||||||
|
|||||||
+15
@@ -39,6 +39,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.functions.function.TO_OBJECT_FUNCTION;
|
import speiger.src.collections.PACKAGE.functions.function.TO_OBJECT_FUNCTION;
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -153,6 +156,18 @@ public interface ITERABLE KEY_GENERIC_TYPE extends Iterable<CLASS_TYPE>
|
|||||||
iterator().forEachRemaining(input, action);
|
iterator().forEachRemaining(input, action);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
||||||
|
* @param action The action to be performed for each element
|
||||||
|
* @param input the object that should be included
|
||||||
|
* @param <E> the generic type of the Object
|
||||||
|
* @throws java.lang.NullPointerException if the specified action is null
|
||||||
|
*/
|
||||||
|
default <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
iterator().forEachRemaining(action, input);
|
||||||
|
}
|
||||||
|
|
||||||
#if SPLIT_ITERATOR_FEATURE
|
#if SPLIT_ITERATOR_FEATURE
|
||||||
/**
|
/**
|
||||||
* A Type Specific Type Splititerator to reduce boxing/unboxing
|
* A Type Specific Type Splititerator to reduce boxing/unboxing
|
||||||
|
|||||||
+15
@@ -9,6 +9,9 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Type-Specific {@link Iterator} that reduces (un)boxing
|
* A Type-Specific {@link Iterator} that reduces (un)boxing
|
||||||
@@ -79,6 +82,18 @@ public interface ITERATOR KEY_GENERIC_TYPE extends Iterator<CLASS_TYPE>
|
|||||||
while(hasNext()) { action.accept(input, NEXT()); }
|
while(hasNext()) { action.accept(input, NEXT()); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
|
||||||
|
* @param action The action to be performed for each element
|
||||||
|
* @param input the object that should be included
|
||||||
|
* @param <E> the generic type of the Object
|
||||||
|
* @throws java.lang.NullPointerException if the specified action is null
|
||||||
|
*/
|
||||||
|
default <E> void forEachRemaining(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
while(hasNext()) { action.accept(NEXT(), input); }
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Skips the Given amount of elements if possible. A Optimization function to skip elements faster if the implementation allows it.
|
* Skips the Given amount of elements if possible. A Optimization function to skip elements faster if the implementation allows it.
|
||||||
* @param amount the amount of elements that should be skipped
|
* @param amount the amount of elements that should be skipped
|
||||||
|
|||||||
@@ -50,7 +50,11 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -703,6 +707,20 @@ public class ARRAY_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||||||
action.accept(input, data[i]);
|
action.accept(input, data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++)
|
||||||
|
action.accept(data[i], input);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++)
|
||||||
|
action.accept(i, data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+20
@@ -49,7 +49,11 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -826,6 +830,22 @@ public class COPY_ON_WRITE_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENER
|
|||||||
action.accept(input, data[i]);
|
action.accept(input, data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
KEY_TYPE[] data = this.data;
|
||||||
|
for(int i = 0,m=data.length;i<m;i++)
|
||||||
|
action.accept(data[i], input);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
KEY_TYPE[] data = this.data;
|
||||||
|
for(int i = 0,m=data.length;i<m;i++)
|
||||||
|
action.accept(i, data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+18
@@ -49,7 +49,11 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.PACKAGE.utils.ARRAYS;
|
import speiger.src.collections.PACKAGE.utils.ARRAYS;
|
||||||
#endif
|
#endif
|
||||||
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -359,6 +363,20 @@ public class IMMUTABLE_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_T
|
|||||||
action.accept(input, data[i]);
|
action.accept(input, data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0,m=data.length;i<m;i++)
|
||||||
|
action.accept(data[i], input);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0,m=data.length;i<m;i++)
|
||||||
|
action.accept(i, data[i]);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -512,6 +515,13 @@ public class LINKED_LIST KEY_GENERIC_TYPE extends ABSTRACT_LIST KEY_GENERIC_TYPE
|
|||||||
action.accept(input, entry.value);
|
action.accept(input, entry.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Entry KEY_GENERIC_TYPE entry = first;entry != null;entry = entry.next)
|
||||||
|
action.accept(entry.value, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+67
-2
@@ -25,15 +25,20 @@ import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
@@ -82,6 +87,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.VALUE_OPTIONAL;
|
import speiger.src.collections.VALUE_PACKAGE.functions.VALUE_OPTIONAL;
|
||||||
@@ -758,6 +766,25 @@ public class CONCURRENT_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0,m=segments.length;i<m;i++) {
|
||||||
|
Segment KEY_VALUE_GENERIC_TYPE seg = segments[i];
|
||||||
|
long stamp = seg.readLock();
|
||||||
|
try {
|
||||||
|
int index = seg.firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(new ValueMapEntry(index, i), input);
|
||||||
|
index = (int)seg.links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
seg.unlockRead(stamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1087,6 +1114,25 @@ public class CONCURRENT_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0,m=segments.length;i<m;i++) {
|
||||||
|
Segment KEY_VALUE_GENERIC_TYPE seg = segments[i];
|
||||||
|
long stamp = seg.readLock();
|
||||||
|
try {
|
||||||
|
int index = seg.firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(seg.keys[index], input);
|
||||||
|
index = (int)seg.links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
seg.unlockRead(stamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1355,6 +1401,25 @@ public class CONCURRENT_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0,m=segments.length;i<m;i++) {
|
||||||
|
Segment KEY_VALUE_GENERIC_TYPE seg = segments[i];
|
||||||
|
long stamp = seg.readLock();
|
||||||
|
try {
|
||||||
|
int index = seg.firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(seg.values[index], input);
|
||||||
|
index = (int)seg.links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
finally {
|
||||||
|
seg.unlockRead(stamp);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+43
-2
@@ -21,9 +21,14 @@ import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -33,7 +38,7 @@ import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUME
|
|||||||
import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.PACKAGE.functions.function.SINGLE_UNARY_OPERATOR;
|
import speiger.src.collections.PACKAGE.functions.function.SINGLE_UNARY_OPERATOR;
|
||||||
@@ -60,6 +65,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -827,6 +835,17 @@ public class LINKED_CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends CUSTOM_HASH_M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(new ValueMapEntry(index), input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1108,6 +1127,17 @@ public class LINKED_CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends CUSTOM_HASH_M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1291,6 +1321,17 @@ public class LINKED_CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends CUSTOM_HASH_M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(values[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+40
-3
@@ -22,15 +22,20 @@ import java.util.VALUE_OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
@@ -77,7 +82,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !SAME_TYPE
|
#if !SAME_TYPE
|
||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -1030,6 +1037,16 @@ public class CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(new ValueMapEntry(nullIndex), input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE)) action.accept(new ValueMapEntry(i), input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1277,6 +1294,16 @@ public class CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(keys[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE)) action.accept(keys[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1443,6 +1470,16 @@ public class CUSTOM_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VAL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(values[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE)) action.accept(values[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+43
-3
@@ -21,9 +21,14 @@ import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -33,7 +38,7 @@ import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUME
|
|||||||
import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.PACKAGE.functions.function.SINGLE_UNARY_OPERATOR;
|
import speiger.src.collections.PACKAGE.functions.function.SINGLE_UNARY_OPERATOR;
|
||||||
@@ -58,7 +63,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !SAME_TYPE
|
#if !SAME_TYPE
|
||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -831,6 +838,17 @@ public class LINKED_HASH_MAP KEY_VALUE_GENERIC_TYPE extends HASH_MAP KEY_VALUE_G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(new ValueMapEntry(index), input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1110,6 +1128,17 @@ public class LINKED_HASH_MAP KEY_VALUE_GENERIC_TYPE extends HASH_MAP KEY_VALUE_G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1295,6 +1324,17 @@ public class LINKED_HASH_MAP KEY_VALUE_GENERIC_TYPE extends HASH_MAP KEY_VALUE_G
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(values[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+40
-3
@@ -22,15 +22,20 @@ import java.util.VALUE_OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
@@ -76,7 +81,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.VALUE_OPTIONAL;
|
import speiger.src.collections.VALUE_PACKAGE.functions.VALUE_OPTIONAL;
|
||||||
@@ -989,6 +996,16 @@ public class HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GENE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(new ValueMapEntry(nullIndex), input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(KEY_EQUALS_NOT_NULL(keys[i])) action.accept(new ValueMapEntry(i), input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1232,6 +1249,16 @@ public class HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GENE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(keys[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(KEY_EQUALS_NOT_NULL(keys[i])) action.accept(keys[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1398,6 +1425,16 @@ public class HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GENE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(values[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(KEY_EQUALS_NOT_NULL(keys[i])) action.accept(values[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+43
-2
@@ -21,9 +21,14 @@ import java.util.VALUE_OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -35,7 +40,7 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
@@ -82,6 +87,9 @@ import speiger.src.collections.VALUE_PACKAGE.functions.VALUE_CONSUMER;
|
|||||||
import speiger.src.collections.VALUE_PACKAGE.lists.VALUE_LIST_ITERATOR;
|
import speiger.src.collections.VALUE_PACKAGE.lists.VALUE_LIST_ITERATOR;
|
||||||
import speiger.src.collections.VALUE_PACKAGE.utils.VALUE_ARRAYS;
|
import speiger.src.collections.VALUE_PACKAGE.utils.VALUE_ARRAYS;
|
||||||
#endif
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;
|
import speiger.src.collections.objects.collections.ObjectBidirectionalIterator;
|
||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
@@ -739,6 +747,17 @@ public class IMMUTABLE_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(new BasicEntryKV_BRACES(keys[index], values[index]), input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -990,6 +1009,17 @@ public class IMMUTABLE_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1166,6 +1196,17 @@ public class IMMUTABLE_HASH_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1){
|
||||||
|
action.accept(values[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+36
-3
@@ -21,9 +21,14 @@ import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -35,7 +40,7 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
@@ -66,9 +71,12 @@ import speiger.src.collections.VALUE_PACKAGE.lists.VALUE_LIST_ITERATOR;
|
|||||||
import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE
|
#if !SAME_TYPE
|
||||||
#if VALUE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -972,6 +980,13 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN
|
|||||||
action.accept(input, new ValueMapEntry(i));
|
action.accept(input, new ValueMapEntry(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++) {
|
||||||
|
action.accept(new ValueMapEntry(i), input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
@@ -1181,6 +1196,12 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN
|
|||||||
for(int i = 0;i<size;action.accept(input, keys[i++]));
|
for(int i = 0;i<size;action.accept(input, keys[i++]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;action.accept(keys[i++], input));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1323,6 +1344,18 @@ public class ARRAY_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_GEN
|
|||||||
for(int i = 0;i<size;action.accept(i, values[i++]));
|
for(int i = 0;i<size;action.accept(i, values[i++]));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(E input, VALUE_BI_FROM_OBJECT_CONSUMER VSV_GENERIC_TYPE<E> action) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;action.accept(input, values[i++]));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;action.accept(values[i++], input));
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+38
-2
@@ -26,9 +26,14 @@ import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
|||||||
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -37,7 +42,7 @@ import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUME
|
|||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
import speiger.src.collections.PACKAGE.functions.function.FUNCTION;
|
import speiger.src.collections.PACKAGE.functions.function.FUNCTION;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_OBJECT && !JDK_TYPE
|
#if !TYPE_OBJECT && !JDK_TYPE
|
||||||
@@ -76,6 +81,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -1284,6 +1292,13 @@ public class AVL_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = start(), end = end();entry != null && (end == null || (end != previous(entry)));entry = next(entry))
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1986,6 +2001,13 @@ public class AVL_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_
|
|||||||
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = subLowest(), last = subHighest();entry != null && (last == null || last != previous(entry));entry = next(entry))
|
||||||
|
action.accept(new BasicEntryKV_BRACES(entry.key, entry.value), input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2126,6 +2148,13 @@ public class AVL_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_
|
|||||||
action.accept(input, entry.value);
|
action.accept(input, entry.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = subLowest(), last = subHighest();entry != null && (last == null || last != previous(entry));entry = next(entry))
|
||||||
|
action.accept(entry.value, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2647,6 +2676,13 @@ public class AVL_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_
|
|||||||
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||||
|
action.accept(new BasicEntryKV_BRACES(entry.key, entry.value), input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+45
-3
@@ -25,9 +25,14 @@ import speiger.src.collections.PACKAGE.collections.BI_ITERATOR;
|
|||||||
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
||||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !VALUE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
#if !TYPE_INT || !SAME_TYPE
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
#if !TYPE_OBJECT && !VALUE_OBJECT
|
#endif
|
||||||
|
#if !TYPE_OBJECT && !VALUE_OBJECT && !TYPE_INT
|
||||||
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
import speiger.src.collections.ints.functions.consumer.IntObjectConsumer;
|
||||||
#endif
|
#endif
|
||||||
#if !SAME_TYPE && !TYPE_INT
|
#if !SAME_TYPE && !TYPE_INT
|
||||||
@@ -36,7 +41,7 @@ import speiger.src.collections.ints.functions.consumer.VALUE_BI_FROM_INT_CONSUME
|
|||||||
#if !VALUE_BOOLEAN || !JDK_TYPE
|
#if !VALUE_BOOLEAN || !JDK_TYPE
|
||||||
import speiger.src.collections.PACKAGE.functions.function.FUNCTION;
|
import speiger.src.collections.PACKAGE.functions.function.FUNCTION;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_INT || !SAME_TYPE
|
#if !TYPE_INT || !SAME_TYPE || !VALUE_OBJECT
|
||||||
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !TYPE_OBJECT && !JDK_TYPE
|
#if !TYPE_OBJECT && !JDK_TYPE
|
||||||
@@ -74,7 +79,9 @@ import speiger.src.collections.objects.functions.consumer.ObjectObjectConsumer;
|
|||||||
#if !SAME_TYPE
|
#if !SAME_TYPE
|
||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.VALUE_BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
|
#if !VALUE_OBJECT && !VALUE_INT
|
||||||
|
import speiger.src.collections.VALUE_PACKAGE.functions.consumer.VALUE_BI_TO_OBJECT_CONSUMER;
|
||||||
#endif
|
#endif
|
||||||
#if !JDK_VALUE
|
#if !JDK_VALUE
|
||||||
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
import speiger.src.collections.VALUE_PACKAGE.functions.function.VALUE_PREDICATE;
|
||||||
@@ -1340,6 +1347,13 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = start(), end = end();entry != null && (end == null || (end != previous(entry)));entry = next(entry))
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2052,6 +2066,13 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
|
|||||||
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = subLowest(), last = subHighest();entry != null && (last == null || last != previous(entry));entry = next(entry))
|
||||||
|
action.accept(new BasicEntryKV_BRACES(entry.key, entry.value), input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2192,6 +2213,13 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
|
|||||||
action.accept(input, entry.value);
|
action.accept(input, entry.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = subLowest(), last = subHighest();entry != null && (last == null || last != previous(entry));entry = next(entry))
|
||||||
|
action.accept(entry.value, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2548,6 +2576,13 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
|
|||||||
action.accept(input, entry.value);
|
action.accept(input, entry.value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(VALUE_BI_TO_OBJECT_CONSUMER VVS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||||
|
action.accept(entry.value, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
public boolean matchesAny(VALUE_PREDICATE VALUE_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -2713,6 +2748,13 @@ public class RB_TREE_MAP KEY_VALUE_GENERIC_TYPE extends ABSTRACT_MAP KEY_VALUE_G
|
|||||||
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
action.accept(input, new BasicEntryKV_BRACES(entry.key, entry.value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(ObjectObjectConsumer<MAP.Entry KEY_VALUE_GENERIC_TYPE, E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Node KEY_VALUE_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||||
|
action.accept(new BasicEntryKV_BRACES(entry.key, entry.value), input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
public boolean matchesAny(Predicate<MAP.Entry KEY_VALUE_GENERIC_TYPE> filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -425,6 +428,13 @@ public class AVL_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Entry KEY_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1311,6 +1321,13 @@ public class AVL_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Entry KEY_GENERIC_TYPE entry = start();entry != null && inRange(entry.key);entry = next(entry))
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -488,6 +491,13 @@ public class ARRAY_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE im
|
|||||||
action.accept(input, data[i]);
|
action.accept(input, data[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++)
|
||||||
|
action.accept(data[i], input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+13
@@ -27,6 +27,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -363,6 +366,16 @@ public class IMMUTABLE_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+13
@@ -37,6 +37,9 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -683,6 +686,16 @@ public class LINKED_CUSTOM_HASH_SET KEY_GENERIC_TYPE extends CUSTOM_HASH_SET KEY
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+13
@@ -35,6 +35,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -538,6 +541,16 @@ public class LINKED_HASH_SET KEY_GENERIC_TYPE extends HASH_SET KEY_GENERIC_TYPE
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
int index = firstIndex;
|
||||||
|
while(index != -1) {
|
||||||
|
action.accept(keys[index], input);
|
||||||
|
index = (int)links[index];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+13
@@ -34,6 +34,9 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -622,6 +625,16 @@ public class CUSTOM_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_T
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(keys[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(!strategy.equals(keys[i], EMPTY_KEY_VALUE)) action.accept(keys[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
@@ -34,6 +34,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -485,6 +488,16 @@ public class HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE imp
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
if(size() <= 0) return;
|
||||||
|
if(containsNull) action.accept(keys[nullIndex], input);
|
||||||
|
for(int i = nullIndex-1;i>=0;i--) {
|
||||||
|
if(KEY_EQUALS_NOT_NULL(keys[i])) action.accept(keys[i], input);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
@@ -33,6 +33,9 @@ import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
|||||||
#endif
|
#endif
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !JDK_FUNCTION
|
#if !JDK_FUNCTION
|
||||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||||
#endif
|
#endif
|
||||||
@@ -424,6 +427,13 @@ public class RB_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Entry KEY_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
@@ -1371,6 +1381,13 @@ public class RB_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
|||||||
action.accept(input, entry.key);
|
action.accept(input, entry.key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(Entry KEY_GENERIC_TYPE entry = start();entry != null && inRange(entry.key);entry = next(entry))
|
||||||
|
action.accept(entry.key, input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||||
Objects.requireNonNull(filter);
|
Objects.requireNonNull(filter);
|
||||||
|
|||||||
+26
@@ -1,6 +1,7 @@
|
|||||||
package speiger.src.collections.PACKAGE.utils;
|
package speiger.src.collections.PACKAGE.utils;
|
||||||
|
|
||||||
import java.util.concurrent.CancellationException;
|
import java.util.concurrent.CancellationException;
|
||||||
|
import java.util.concurrent.CompletableFuture;
|
||||||
import java.util.concurrent.ExecutionException;
|
import java.util.concurrent.ExecutionException;
|
||||||
import java.util.concurrent.Executor;
|
import java.util.concurrent.Executor;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -520,6 +521,16 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
|||||||
return toRun.GET_KEY(timeout, unit);
|
return toRun.GET_KEY(timeout, unit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Starts the execution of the task and returns a future so it can be used with a future.
|
||||||
|
* @return the task as a future
|
||||||
|
*/
|
||||||
|
public CompletableFuture<CLASS_TYPE> toFuture() {
|
||||||
|
BASE_TASK KEY_GENERIC_TYPE toRun = task;
|
||||||
|
task = null;
|
||||||
|
return toRun.toFuture();
|
||||||
|
}
|
||||||
|
|
||||||
#if !TYPE_OBJECT
|
#if !TYPE_OBJECT
|
||||||
private static class ReduceTask extends BASE_TASK
|
private static class ReduceTask extends BASE_TASK
|
||||||
{
|
{
|
||||||
@@ -881,6 +892,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
|||||||
private static final int CANCELLED = 7;
|
private static final int CANCELLED = 7;
|
||||||
private volatile WaitNode waiter;
|
private volatile WaitNode waiter;
|
||||||
private volatile int state = CREATED;
|
private volatile int state = CREATED;
|
||||||
|
private volatile boolean locked = false;
|
||||||
Consumer<TASK KEY_GENERIC_TYPE> callback;
|
Consumer<TASK KEY_GENERIC_TYPE> callback;
|
||||||
Executor executor = SanityChecks::invokeAsyncTask;
|
Executor executor = SanityChecks::invokeAsyncTask;
|
||||||
KEY_TYPE result;
|
KEY_TYPE result;
|
||||||
@@ -950,6 +962,17 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
|||||||
onCompletion();
|
onCompletion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CompletableFuture<CLASS_TYPE> toFuture() {
|
||||||
|
locked = true;
|
||||||
|
Executor exe = this.executor;
|
||||||
|
this.executor = Runnable::run;
|
||||||
|
return CompletableFuture.supplyAsync(() -> {
|
||||||
|
begin();
|
||||||
|
try { return GET_KEY(); }
|
||||||
|
catch(Exception e) { throw new RuntimeException(e); }
|
||||||
|
}, exe);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean cancel(boolean cancelIfRunnning) {
|
public boolean cancel(boolean cancelIfRunnning) {
|
||||||
if(state == RUNNING && !cancelIfRunnning) return false;
|
if(state == RUNNING && !cancelIfRunnning) return false;
|
||||||
@@ -1044,12 +1067,14 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void pause() {
|
public void pause() {
|
||||||
|
if(locked) throw new IllegalStateException("Completable Future Wrap doesn't support pause");
|
||||||
if(state == PAUSED || state == PAUSING || state >= FINISHING) return;
|
if(state == PAUSED || state == PAUSING || state >= FINISHING) return;
|
||||||
state = PAUSING;
|
state = PAUSING;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void awaitPausing() {
|
public void awaitPausing() {
|
||||||
|
if(locked) throw new IllegalStateException("Completable Future Wrap doesn't support pause");
|
||||||
if(state == PAUSED) return;
|
if(state == PAUSED) return;
|
||||||
pause();
|
pause();
|
||||||
if(state == PAUSING) {
|
if(state == PAUSING) {
|
||||||
@@ -1061,6 +1086,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void resume() {
|
public void resume() {
|
||||||
|
if(locked) throw new IllegalStateException("Completable Future Wrap doesn't support pause");
|
||||||
if(state != PAUSED && state != PAUSING) return;
|
if(state != PAUSED && state != PAUSING) return;
|
||||||
if(state == PAUSING) {
|
if(state == PAUSING) {
|
||||||
while(state == PAUSING) {
|
while(state == PAUSING) {
|
||||||
|
|||||||
+25
-4
@@ -46,6 +46,9 @@ import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
|||||||
import speiger.src.collections.PACKAGE.functions.function.UNARY_OPERATOR;
|
import speiger.src.collections.PACKAGE.functions.function.UNARY_OPERATOR;
|
||||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_CONSUMER;
|
||||||
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
import speiger.src.collections.objects.functions.consumer.BI_FROM_OBJECT_CONSUMER;
|
||||||
|
#if !TYPE_OBJECT
|
||||||
|
import speiger.src.collections.PACKAGE.functions.consumer.BI_TO_OBJECT_CONSUMER;
|
||||||
|
#endif
|
||||||
#if !TYPE_BOOLEAN
|
#if !TYPE_BOOLEAN
|
||||||
import speiger.src.collections.utils.HashUtil;
|
import speiger.src.collections.utils.HashUtil;
|
||||||
#endif
|
#endif
|
||||||
@@ -294,6 +297,13 @@ public class COLLECTIONS
|
|||||||
action.accept(elements[i]);
|
action.accept(elements[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++)
|
||||||
|
action.accept(i, elements[i]);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) {
|
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) {
|
||||||
Objects.requireNonNull(action);
|
Objects.requireNonNull(action);
|
||||||
@@ -301,6 +311,13 @@ public class COLLECTIONS
|
|||||||
action.accept(input, elements[i]);
|
action.accept(input, elements[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) {
|
||||||
|
Objects.requireNonNull(action);
|
||||||
|
for(int i = 0;i<size;i++)
|
||||||
|
action.accept(elements[i], input);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean trim(int size) {
|
public boolean trim(int size) {
|
||||||
if(size > size() || size() == elements.length) return false;
|
if(size > size() || size() == elements.length) return false;
|
||||||
@@ -855,6 +872,10 @@ public class COLLECTIONS
|
|||||||
@Override
|
@Override
|
||||||
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) { synchronized(mutex) { c.forEachIndexed(action); } }
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) { synchronized(mutex) { c.forEachIndexed(action); } }
|
||||||
@Override
|
@Override
|
||||||
|
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) { synchronized(mutex) { c.forEach(input, action); } }
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) { synchronized(mutex) { c.forEach(action, input); } }
|
||||||
|
@Override
|
||||||
public int hashCode() { synchronized(mutex) { return c.hashCode(); } }
|
public int hashCode() { synchronized(mutex) { return c.hashCode(); } }
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) {
|
public boolean equals(Object obj) {
|
||||||
@@ -864,8 +885,6 @@ public class COLLECTIONS
|
|||||||
@Override
|
@Override
|
||||||
public String toString() { synchronized(mutex) { return c.toString(); } }
|
public String toString() { synchronized(mutex) { return c.toString(); } }
|
||||||
@Override
|
@Override
|
||||||
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) { synchronized(mutex) { c.forEach(input, action); } }
|
|
||||||
@Override
|
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.matchesAny(filter); } }
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.matchesAny(filter); } }
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesNone(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.matchesNone(filter); } }
|
public boolean matchesNone(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.matchesNone(filter); } }
|
||||||
@@ -1010,14 +1029,16 @@ public class COLLECTIONS
|
|||||||
@Override
|
@Override
|
||||||
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) { c.forEachIndexed(action); }
|
public void forEachIndexed(BI_FROM_INT_CONSUMER KEY_GENERIC_TYPE action) { c.forEachIndexed(action); }
|
||||||
@Override
|
@Override
|
||||||
|
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) { c.forEach(input, action); }
|
||||||
|
@Override
|
||||||
|
public <E> void forEach(BI_TO_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action, E input) { c.forEach(action, input); }
|
||||||
|
@Override
|
||||||
public int hashCode() { return c.hashCode(); }
|
public int hashCode() { return c.hashCode(); }
|
||||||
@Override
|
@Override
|
||||||
public boolean equals(Object obj) { return obj == this || c.equals(obj); }
|
public boolean equals(Object obj) { return obj == this || c.equals(obj); }
|
||||||
@Override
|
@Override
|
||||||
public String toString() { return c.toString(); }
|
public String toString() { return c.toString(); }
|
||||||
@Override
|
@Override
|
||||||
public <E> void forEach(E input, BI_FROM_OBJECT_CONSUMER KSK_GENERIC_TYPE<E> action) { c.forEach(input, action); }
|
|
||||||
@Override
|
|
||||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) { return c.matchesAny(filter); }
|
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) { return c.matchesAny(filter); }
|
||||||
@Override
|
@Override
|
||||||
public boolean matchesNone(PREDICATE KEY_GENERIC_TYPE filter) { return c.matchesNone(filter); }
|
public boolean matchesNone(PREDICATE KEY_GENERIC_TYPE filter) { return c.matchesNone(filter); }
|
||||||
|
|||||||
+18
@@ -44,6 +44,15 @@ public class FILE_KEY_TYPECollectionForEachTester KEY_GENERIC_TYPE extends ABSTR
|
|||||||
HELPERS.assertContentsAnyOrder(elements, createSamplesArray());
|
HELPERS.assertContentsAnyOrder(elements, createSamplesArray());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ignore
|
||||||
|
@CollectionFeature.Require(absent = KNOWN_ORDER)
|
||||||
|
public void testForEachExtraUnknownOrderReverse() {
|
||||||
|
#endignore
|
||||||
|
LIST KEY_GENERIC_TYPE elements = new ARRAY_LISTBRACES();
|
||||||
|
collection.forEach((K, V) -> V.add(K), elements);
|
||||||
|
HELPERS.assertContentsAnyOrder(elements, createSamplesArray());
|
||||||
|
}
|
||||||
|
|
||||||
#ignore
|
#ignore
|
||||||
@CollectionFeature.Require(KNOWN_ORDER)
|
@CollectionFeature.Require(KNOWN_ORDER)
|
||||||
public void testForEachKnownOrder() {
|
public void testForEachKnownOrder() {
|
||||||
@@ -70,4 +79,13 @@ public class FILE_KEY_TYPECollectionForEachTester KEY_GENERIC_TYPE extends ABSTR
|
|||||||
collection.forEach(elements, LIST::add);
|
collection.forEach(elements, LIST::add);
|
||||||
assertEquals("Different ordered iteration", HELPERS.copyToList(getOrderedElements()), elements);
|
assertEquals("Different ordered iteration", HELPERS.copyToList(getOrderedElements()), elements);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ignore
|
||||||
|
@CollectionFeature.Require(KNOWN_ORDER)
|
||||||
|
public void testForEachExtraKnownOrderReverse() {
|
||||||
|
#endignore
|
||||||
|
LIST KEY_GENERIC_TYPE elements = new ARRAY_LISTBRACES();
|
||||||
|
collection.forEach((K, V) -> V.add(K), elements);
|
||||||
|
assertEquals("Different ordered iteration", HELPERS.copyToList(getOrderedElements()), elements);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ public abstract class BaseInt2IntMapTest
|
|||||||
if(!getValidMapTests().contains(MapTests.PUT)) return;
|
if(!getValidMapTests().contains(MapTests.PUT)) return;
|
||||||
Int2IntMap putMap = createMap(PUT_ARRAY, PUT_VALUE_ARRAY);
|
Int2IntMap putMap = createMap(PUT_ARRAY, PUT_VALUE_ARRAY);
|
||||||
Assert.assertEquals(PUT_ARRAY.length, putMap.size());
|
Assert.assertEquals(PUT_ARRAY.length, putMap.size());
|
||||||
Assert.assertEquals(0, putMap.put(0, 512));
|
Assert.assertEquals(putMap.getDefaultReturnValue(), putMap.put(0, 512));
|
||||||
Assert.assertEquals(1, putMap.put(513, 2));
|
Assert.assertEquals(1, putMap.put(513, 2));
|
||||||
Assert.assertEquals(PUT_ARRAY.length + 1, putMap.size());
|
Assert.assertEquals(PUT_ARRAY.length + 1, putMap.size());
|
||||||
Assert.assertEquals(512, putMap.addTo(0, 1));
|
Assert.assertEquals(512, putMap.addTo(0, 1));
|
||||||
|
|||||||
Reference in New Issue
Block a user