Refactor and New Features
-Changed: Refactored some variable names because they got out of hand since they were handed for single cases instead of making actual specific rules. -Added: mapping functions (only to objects) are now accessible to primitive collections. -Added: Filter function for Iterables/Iterators. (Iterable implements them automatically)
This commit is contained in:
@@ -304,7 +304,7 @@ public class AVL_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
for(Entry KEY_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||
action.accept(entry.key, input);
|
||||
|
||||
@@ -350,7 +350,7 @@ public class ARRAY_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE im
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
for(int i = 0;i<size;i++)
|
||||
action.accept(data[i], input);
|
||||
|
||||
+1
-1
@@ -297,7 +297,7 @@ public class IMMUTABLE_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERI
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
int index = firstIndex;
|
||||
while(index != -1) {
|
||||
|
||||
+1
-1
@@ -534,7 +534,7 @@ public class LINKED_CUSTOM_HASH_SET KEY_GENERIC_TYPE extends CUSTOM_HASH_SET KEY
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
int index = firstIndex;
|
||||
while(index != -1) {
|
||||
|
||||
+1
-1
@@ -389,7 +389,7 @@ public class LINKED_HASH_SET KEY_GENERIC_TYPE extends HASH_SET KEY_GENERIC_TYPE
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
int index = firstIndex;
|
||||
while(index != -1) {
|
||||
|
||||
+1
-1
@@ -468,7 +468,7 @@ public class CUSTOM_HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_T
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
if(size() <= 0) return;
|
||||
if(containsNull) action.accept(keys[nullIndex], input);
|
||||
|
||||
+1
-1
@@ -337,7 +337,7 @@ public class HASH_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE imp
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
if(size() <= 0) return;
|
||||
if(containsNull) action.accept(keys[nullIndex], input);
|
||||
|
||||
@@ -304,7 +304,7 @@ public class RB_TREE_SET KEY_GENERIC_TYPE extends ABSTRACT_SET KEY_GENERIC_TYPE
|
||||
}
|
||||
|
||||
@Override
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KEY_VALUE_SPECIAL_GENERIC_TYPE action) {
|
||||
public <E> void forEach(E input, BI_OBJECT_CONSUMER KKS_GENERIC_TYPE<E> action) {
|
||||
Objects.requireNonNull(action);
|
||||
for(Entry KEY_GENERIC_TYPE entry = first;entry != null;entry = entry.next())
|
||||
action.accept(entry.key, input);
|
||||
|
||||
Reference in New Issue
Block a user