Added forEach(CONSUMER, Input)
This commit is contained in:
+13
@@ -37,6 +37,9 @@ import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||
#endif
|
||||
import speiger.src.collections.ints.functions.consumer.BI_FROM_INT_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
|
||||
import speiger.src.collections.PACKAGE.functions.function.PREDICATE;
|
||||
#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
|
||||
public boolean matchesAny(PREDICATE KEY_GENERIC_TYPE filter) {
|
||||
Objects.requireNonNull(filter);
|
||||
|
||||
Reference in New Issue
Block a user