1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-27 17:15:21 +00:00

Format code.

This commit is contained in:
2017-08-04 14:29:24 -07:00
parent 0058ec9c71
commit c541eaab97
6 changed files with 152 additions and 152 deletions

View File

@@ -92,13 +92,13 @@ public class BinaryNode extends TreeNode {
@Override
public <T> T reduce(Reducer<T> reducer) {
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
T leftReduce = left.reduce(reducer);
T rightReduce = right.reduce(reducer);
if (leftReduce == null || rightReduce == null) return null;
T a = reducer.reduceNode(this, leftReduce, rightReduce);
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
return a;
}

View File

@@ -62,15 +62,15 @@ public class FunctionNode extends TreeNode {
@Override
public <T> T reduce(Reducer<T> reducer) {
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
Object[] reducedChildren = new Object[children.size()];
for (int i = 0; i < reducedChildren.length; i++) {
reducedChildren[i] = children.get(i).reduce(reducer);
if (Thread.currentThread().isInterrupted()||reducedChildren[i] == null) return null;
if (Thread.currentThread().isInterrupted() || reducedChildren[i] == null) return null;
}
T a = reducer.reduceNode(this, reducedChildren);
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
return a;
}

View File

@@ -33,12 +33,12 @@ public class UnaryNode extends TreeNode {
@Override
public <T> T reduce(Reducer<T> reducer) {
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
Object reducedChild = applyTo.reduce(reducer);
if (reducedChild == null) return null;
T a = reducer.reduceNode(this, reducedChild);
if(Thread.currentThread().isInterrupted())
if (Thread.currentThread().isInterrupted())
return null;
return a;
}