mirror of
https://github.com/DanilaFe/abacus
synced 2026-01-28 01:25:19 +00:00
Add stop button
This commit is contained in:
@@ -33,9 +33,16 @@ public class UnaryNode extends TreeNode {
|
||||
|
||||
@Override
|
||||
public <T> T reduce(Reducer<T> reducer) {
|
||||
if(Thread.currentThread().isInterrupted())
|
||||
return null;
|
||||
Object reducedChild = applyTo.reduce(reducer);
|
||||
if (reducedChild == null) return null;
|
||||
return reducer.reduceNode(this, reducedChild);
|
||||
if(Thread.currentThread().isInterrupted())
|
||||
return null;
|
||||
T a = reducer.reduceNode(this, reducedChild);
|
||||
if(Thread.currentThread().isInterrupted())
|
||||
return null;
|
||||
return a;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user