From 040870eced4dc3e273313b9ec2ce7bb88d9cc6a0 Mon Sep 17 00:00:00 2001 From: bjculkin Date: Mon, 12 Feb 2018 22:57:29 -0500 Subject: Commenting --- base/src/main/java/bjc/utils/funcutils/StringUtils.java | 5 +++-- base/src/main/java/bjc/utils/funcutils/TreeUtils.java | 8 +++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'base/src/main/java/bjc/utils/funcutils') diff --git a/base/src/main/java/bjc/utils/funcutils/StringUtils.java b/base/src/main/java/bjc/utils/funcutils/StringUtils.java index fa7e59e..e753abd 100644 --- a/base/src/main/java/bjc/utils/funcutils/StringUtils.java +++ b/base/src/main/java/bjc/utils/funcutils/StringUtils.java @@ -161,9 +161,9 @@ public class StringUtils { public static String toEnglishList(final Object[] objects, final boolean and) { if(and) { return toEnglishList(objects, "and"); - } else { - return toEnglishList(objects, "or"); } + + return toEnglishList(objects, "or"); } /** @@ -194,6 +194,7 @@ public class StringUtils { * * @param pattern * The pattern to count occurances of. + * @return The number of times the pattern matches. */ public static int countMatches(final String value, final String pattern) { Matcher mat = Pattern.compile(pattern).matcher(value); diff --git a/base/src/main/java/bjc/utils/funcutils/TreeUtils.java b/base/src/main/java/bjc/utils/funcutils/TreeUtils.java index 1bdd7b3..ac8bb69 100644 --- a/base/src/main/java/bjc/utils/funcutils/TreeUtils.java +++ b/base/src/main/java/bjc/utils/funcutils/TreeUtils.java @@ -13,9 +13,15 @@ import bjc.utils.funcdata.IList; * @author Benjamin Culkin */ public class TreeUtils { - /* + /** * Convert a tree into a list of outline nodes that match a certain * path. + * + * @param tre + * The tree to outline. + * @param leafMarker + * The path to mark nodes with. + * @return The list of marked paths. */ public static IList> outlineTree(ITree tre, Predicate leafMarker) { IList> paths = new FunctionalList<>(); -- cgit v1.2.3