Finished Function module and added breaking change.
This commit is contained in:
+5
-21
@@ -593,11 +593,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
||||
switch(type) {
|
||||
case 0:
|
||||
while(shouldRun() && iter.hasNext()) {
|
||||
#if TYPE_OBJECT
|
||||
if(filter.getBoolean(iter.NEXT())) {
|
||||
#else
|
||||
if(filter.GET_VALUE(iter.NEXT())) {
|
||||
#endif
|
||||
if(filter.test(iter.NEXT())) {
|
||||
setResult(true);
|
||||
return true;
|
||||
}
|
||||
@@ -605,11 +601,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
||||
break;
|
||||
case 1:
|
||||
while(shouldRun() && iter.hasNext()) {
|
||||
#if TYPE_OBJECT
|
||||
if(filter.getBoolean(iter.NEXT())) {
|
||||
#else
|
||||
if(filter.GET_VALUE(iter.NEXT())) {
|
||||
#endif
|
||||
if(filter.test(iter.NEXT())) {
|
||||
setResult(false);
|
||||
return true;
|
||||
}
|
||||
@@ -617,11 +609,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
||||
break;
|
||||
case 2:
|
||||
while(shouldRun() && iter.hasNext()) {
|
||||
#if TYPE_OBJECT
|
||||
if(!filter.getBoolean(iter.NEXT())) {
|
||||
#else
|
||||
if(!filter.GET_VALUE(iter.NEXT())) {
|
||||
#endif
|
||||
if(!filter.test(iter.NEXT())) {
|
||||
setResult(false);
|
||||
return true;
|
||||
}
|
||||
@@ -658,11 +646,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
||||
protected boolean execute() throws Exception {
|
||||
while(shouldRun() && iter.hasNext()) {
|
||||
KEY_TYPE entry = iter.NEXT();
|
||||
#if TYPE_OBJECT
|
||||
if(filter.getBoolean(iter.NEXT())) {
|
||||
#else
|
||||
if(filter.GET_VALUE(iter.NEXT())) {
|
||||
#endif
|
||||
if(filter.test(iter.NEXT())) {
|
||||
setResult(entry);
|
||||
return true;
|
||||
}
|
||||
@@ -693,7 +677,7 @@ public class ASYNC_BUILDER KEY_GENERIC_TYPE
|
||||
@Override
|
||||
protected boolean execute() throws Exception {
|
||||
while(shouldRun() && iter.hasNext()) {
|
||||
if(filter.TEST_VALUE(iter.NEXT())) {
|
||||
if(filter.test(iter.NEXT())) {
|
||||
counted++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -298,7 +298,7 @@ public class ITERABLES
|
||||
@Override
|
||||
public void forEach(Consumer<? super T> action) {
|
||||
Objects.requireNonNull(action);
|
||||
iterable.forEach(E -> action.accept(mapper.GET_VALUE(E)));
|
||||
iterable.forEach(E -> action.accept(mapper.apply(E)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ public class ITERABLES
|
||||
@Override
|
||||
public void forEach(Consumer<? super T> action) {
|
||||
Objects.requireNonNull(action);
|
||||
iterable.forEach(E -> mapper.GET_VALUE(E).forEach(action));
|
||||
iterable.forEach(E -> mapper.apply(E).forEach(action));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -344,7 +344,7 @@ public class ITERABLES
|
||||
public void forEach(Consumer<? super T> action) {
|
||||
Objects.requireNonNull(action);
|
||||
iterable.forEach(E -> {
|
||||
T[] array = mapper.GET_VALUE(E);
|
||||
T[] array = mapper.apply(E);
|
||||
for(int i = 0,m=array.length;i<m;action.accept(array[i++]));
|
||||
});
|
||||
}
|
||||
@@ -411,12 +411,12 @@ public class ITERABLES
|
||||
@Override
|
||||
public void forEach(CONSUMER action) {
|
||||
Objects.requireNonNull(action);
|
||||
iterable.forEach(T -> { if(!filter.TEST_VALUE(T)) action.accept(T); } );
|
||||
iterable.forEach(T -> { if(!filter.test(T)) action.accept(T); } );
|
||||
}
|
||||
#else
|
||||
public void forEach(Consumer<? super CLASS_TYPE> action) {
|
||||
Objects.requireNonNull(action);
|
||||
iterable.forEach(T -> { if(!filter.TEST_VALUE(T)) action.accept(T); } );
|
||||
iterable.forEach(T -> { if(!filter.test(T)) action.accept(T); } );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -832,7 +832,7 @@ public class ITERATORS
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
return mapper.GET_VALUE(iterator.NEXT());
|
||||
return mapper.apply(iterator.NEXT());
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -858,7 +858,7 @@ public class ITERATORS
|
||||
foundNext = true;
|
||||
while(iterator.hasNext()) {
|
||||
if(last != null && last.hasNext()) return;
|
||||
last = mapper.GET_VALUE(iterator.NEXT()).iterator();
|
||||
last = mapper.apply(iterator.NEXT()).iterator();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -894,7 +894,7 @@ public class ITERATORS
|
||||
foundNext = true;
|
||||
while(iterator.hasNext()) {
|
||||
if(last != null && last.hasNext()) return;
|
||||
last = ObjectIterators.wrap(mapper.GET_VALUE(iterator.NEXT()));
|
||||
last = ObjectIterators.wrap(mapper.apply(iterator.NEXT()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1045,7 +1045,7 @@ public class ITERATORS
|
||||
if(foundNext) return;
|
||||
while(iterator.hasNext()) {
|
||||
lastFound = iterator.NEXT();
|
||||
if(filter.TEST_VALUE(lastFound)) {
|
||||
if(filter.test(lastFound)) {
|
||||
foundNext = true;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user