diff options
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components')
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java | 40 | ||||
| -rw-r--r-- | BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java | 3 |
2 files changed, 23 insertions, 20 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java index bb2d421..6c1bb71 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/FileComponentRepository.java @@ -25,7 +25,8 @@ import bjc.utils.funcutils.FileUtils; * @param <ComponentType> * The type of component being read in */ -public class FileComponentRepository<ComponentType extends IDescribedComponent> +public class FileComponentRepository< + ComponentType extends IDescribedComponent> implements IComponentRepository<ComponentType> { // The logger to use for storing data about this class private static final Logger CLASS_LOGGER = Logger @@ -71,24 +72,25 @@ public class FileComponentRepository<ComponentType extends IDescribedComponent> // Predicate to use to traverse all the files in a directory, but // not recurse into sub-directories - BiPredicate<Path, BasicFileAttributes> firstLevelTraverser = (pth, - attr) -> { - if (attr.isDirectory() && !isFirstDir.getValue()) { - - /* - * Skip directories, they probably have component support - * files. - */ - return false; - } - - /* - * Don't skip the first directory, that's the parent directory - */ - isFirstDir.replace(false); - - return true; - }; + BiPredicate<Path, + BasicFileAttributes> firstLevelTraverser = (pth, attr) -> { + if (attr.isDirectory() && !isFirstDir.getValue()) { + + /* + * Skip directories, they probably have component + * support files. + */ + return false; + } + + /* + * Don't skip the first directory, that's the parent + * directory + */ + isFirstDir.replace(false); + + return true; + }; // Try reading components try { diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java b/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java index 1d322af..a4dbfde 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/IComponentRepository.java @@ -12,7 +12,8 @@ import bjc.utils.funcdata.IMap; * @param <ComponentType> * The type of components contained in this repository */ -public interface IComponentRepository<ComponentType extends IDescribedComponent> { +public interface IComponentRepository< + ComponentType extends IDescribedComponent> { /** * Get all of the components this repository knows about * |
