From df94066e3af02ff02d5ab4d033a3d603f743234c Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:45:04 -0500 Subject: Formatting pass --- .../utils/funcdata/bst/BinarySearchTreeLeaf.java | 28 +++++++++++----------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'base/src/main/java/bjc/utils/funcdata/bst/BinarySearchTreeLeaf.java') diff --git a/base/src/main/java/bjc/utils/funcdata/bst/BinarySearchTreeLeaf.java b/base/src/main/java/bjc/utils/funcdata/bst/BinarySearchTreeLeaf.java index 46f597e..762288f 100644 --- a/base/src/main/java/bjc/utils/funcdata/bst/BinarySearchTreeLeaf.java +++ b/base/src/main/java/bjc/utils/funcdata/bst/BinarySearchTreeLeaf.java @@ -11,7 +11,7 @@ import java.util.function.Predicate; * @author ben * * @param - * The data stored in the tree. + * The data stored in the tree. */ public class BinarySearchTreeLeaf implements ITreePart { /** The data held in this tree leaf */ @@ -24,7 +24,7 @@ public class BinarySearchTreeLeaf implements ITreePart { * Create a new leaf holding the specified data. * * @param element - * The data for the leaf to hold. + * The data for the leaf to hold. */ public BinarySearchTreeLeaf(final T element) { data = element; @@ -37,7 +37,7 @@ public class BinarySearchTreeLeaf implements ITreePart { @Override public E collapse(final Function leafTransformer, final BiFunction branchCollapser) { - if (leafTransformer == null) throw new NullPointerException("Transformer must not be null"); + if(leafTransformer == null) throw new NullPointerException("Transformer must not be null"); return leafTransformer.apply(data); } @@ -54,16 +54,16 @@ public class BinarySearchTreeLeaf implements ITreePart { @Override public void delete(final T element, final Comparator comparator) { - if (data.equals(element)) { + if(data.equals(element)) { isDeleted = true; } } @Override public boolean directedWalk(final DirectedWalkFunction treeWalker) { - if (treeWalker == null) throw new NullPointerException("Tree walker must not be null"); + if(treeWalker == null) throw new NullPointerException("Tree walker must not be null"); - switch (treeWalker.walk(data)) { + switch(treeWalker.walk(data)) { case SUCCESS: return true; /* We don't have any children to care about. */ @@ -78,7 +78,7 @@ public class BinarySearchTreeLeaf implements ITreePart { @Override public boolean forEach(final TreeLinearizationMethod linearizationMethod, final Predicate traversalPredicate) { - if (traversalPredicate == null) throw new NullPointerException("Predicate must not be null"); + if(traversalPredicate == null) throw new NullPointerException("Predicate must not be null"); return traversalPredicate.test(data); } @@ -99,16 +99,16 @@ public class BinarySearchTreeLeaf implements ITreePart { @Override public boolean equals(final Object obj) { - if (this == obj) return true; - if (obj == null) return false; - if (!(obj instanceof BinarySearchTreeLeaf)) return false; + if(this == obj) return true; + if(obj == null) return false; + if(!(obj instanceof BinarySearchTreeLeaf)) return false; final BinarySearchTreeLeaf other = (BinarySearchTreeLeaf) obj; - if (data == null) { - if (other.data != null) return false; - } else if (!data.equals(other.data)) return false; - if (isDeleted != other.isDeleted) return false; + if(data == null) { + if(other.data != null) return false; + } else if(!data.equals(other.data)) return false; + if(isDeleted != other.isDeleted) return false; return true; } -- cgit v1.2.3