Skip to content

Commit 1d46b07

Browse files
New ChildLimitBuilder helper class + refactor/renaming
1 parent bc5a751 commit 1d46b07

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+235
-94
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions

README.md

Lines changed: 13 additions & 10 deletions

ROADMAP.md

Lines changed: 1 addition & 1 deletion
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
package io.github.computerdaddyguy.jfiletreeprettyprinter.example;
2+
3+
import io.github.computerdaddyguy.jfiletreeprettyprinter.ChildLimitBuilder;
4+
import io.github.computerdaddyguy.jfiletreeprettyprinter.FileTreePrettyPrinter;
5+
import io.github.computerdaddyguy.jfiletreeprettyprinter.PathPredicates;
6+
7+
public class ChildLimitDynamic {
8+
9+
public static void main(String[] args) {
10+
var childLimit = ChildLimitBuilder.builder()
11+
.defaultLimit(ChildLimitBuilder.UNLIMITED)
12+
.limit(PathPredicates.hasName("node_modules"), 0)
13+
.build();
14+
var prettyPrinter = FileTreePrettyPrinter.builder()
15+
.customizeOptions(options -> options.withChildLimit(childLimit))
16+
.build();
17+
var tree = prettyPrinter.prettyPrint("src/example/resources/child_limit_dynamic");
18+
System.out.println(tree);
19+
}
20+
21+
}

src/example/java/io/github/computerdaddyguy/jfiletreeprettyprinter/example/ChildrenLimitStatic.java renamed to src/example/java/io/github/computerdaddyguy/jfiletreeprettyprinter/example/ChildLimitStatic.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
import io.github.computerdaddyguy.jfiletreeprettyprinter.FileTreePrettyPrinter;
44

5-
public class ChildrenLimitStatic {
5+
public class ChildLimitStatic {
66

77
public static void main(String[] args) {
88
var prettyPrinter = FileTreePrettyPrinter.builder()
9-
.customizeOptions(options -> options.withChildrenLimit(3))
9+
.customizeOptions(options -> options.withChildLimit(3))
1010
.build();
11-
var tree = prettyPrinter.prettyPrint("src/example/resources/children_limit_static");
11+
var tree = prettyPrinter.prettyPrint("src/example/resources/child_limit_static");
1212
System.out.println(tree);
1313
}
1414

src/example/java/io/github/computerdaddyguy/jfiletreeprettyprinter/example/ChildrenLimitDynamic.java

Lines changed: 0 additions & 19 deletions
This file was deleted.
File renamed without changes.

src/example/resources/children_limit_dynamic/folder_1/file_1_1 renamed to src/example/resources/child_limit_dynamic/folder_1/file_1_1

File renamed without changes.

src/example/resources/children_limit_dynamic/folder_1/file_1_2 renamed to src/example/resources/child_limit_dynamic/folder_1/file_1_2

File renamed without changes.

src/example/resources/children_limit_dynamic/folder_1/file_1_3 renamed to src/example/resources/child_limit_dynamic/folder_1/file_1_3

File renamed without changes.

0 commit comments

Comments
 (0)