Breaking update
- Added: Optionals for the missing JDK ones. - Removed: Default values for Reduce and FindFirst. Using Optionals instead.
This commit is contained in:
+10
-4
@@ -8,6 +8,9 @@ import java.util.ConcurrentModificationException;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
#if JDK_TYPE
|
||||
import java.util.OPTIONAL;
|
||||
#endif
|
||||
#if TYPE_OBJECT
|
||||
import java.util.Comparator;
|
||||
import java.util.function.BiFunction;
|
||||
@@ -30,6 +33,9 @@ import speiger.src.collections.PACKAGE.collections.ITERATOR;
|
||||
#if !TYPE_OBJECT
|
||||
import speiger.src.collections.PACKAGE.functions.COMPARATOR;
|
||||
#endif
|
||||
#if !JDK_TYPE
|
||||
import speiger.src.collections.PACKAGE.functions.OPTIONAL;
|
||||
#endif
|
||||
#if !TYPE_OBJECT
|
||||
import speiger.src.collections.objects.utils.ObjectArrays;
|
||||
import speiger.src.collections.PACKAGE.functions.CONSUMER;
|
||||
@@ -869,9 +875,9 @@ public class COLLECTIONS
|
||||
public KEY_TYPE reduce(KEY_TYPE identity, UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { synchronized(mutex) { return c.reduce(identity, operator); } }
|
||||
#endif
|
||||
@Override
|
||||
public KEY_TYPE reduce(UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { synchronized(mutex) { return c.reduce(operator); } }
|
||||
public OPTIONAL KEY_GENERIC_TYPE reduce(UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { synchronized(mutex) { return c.reduce(operator); } }
|
||||
@Override
|
||||
public KEY_TYPE findFirst(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.findFirst(filter); } }
|
||||
public OPTIONAL KEY_GENERIC_TYPE findFirst(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.findFirst(filter); } }
|
||||
@Override
|
||||
public int count(PREDICATE KEY_GENERIC_TYPE filter) { synchronized(mutex) { return c.count(filter); } }
|
||||
}
|
||||
@@ -1021,9 +1027,9 @@ public class COLLECTIONS
|
||||
public KEY_TYPE reduce(KEY_TYPE identity, UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { return c.reduce(identity, operator); }
|
||||
#endif
|
||||
@Override
|
||||
public KEY_TYPE reduce(UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { return c.reduce(operator); }
|
||||
public OPTIONAL KEY_GENERIC_TYPE reduce(UNARY_OPERATOR KEY_KEY_GENERIC_TYPE operator) { return c.reduce(operator); }
|
||||
@Override
|
||||
public KEY_TYPE findFirst(PREDICATE KEY_GENERIC_TYPE filter) { return c.findFirst(filter); }
|
||||
public OPTIONAL KEY_GENERIC_TYPE findFirst(PREDICATE KEY_GENERIC_TYPE filter) { return c.findFirst(filter); }
|
||||
@Override
|
||||
public int count(PREDICATE KEY_GENERIC_TYPE filter) { return c.count(filter); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user