File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed
src/main/java/com/saasquatch/jsonschemainferrer Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 112112 <plugin >
113113 <groupId >org.apache.maven.plugins</groupId >
114114 <artifactId >maven-source-plugin</artifactId >
115- <version >3.1 .0</version >
115+ <version >3.2 .0</version >
116116 <executions >
117117 <execution >
118118 <id >attach-sources</id >
Original file line number Diff line number Diff line change 99import javax .annotation .Nonnull ;
1010import com .fasterxml .jackson .databind .JsonNode ;
1111
12+ /**
13+ * Utilities for {@link EnumExtractor}
14+ *
15+ * @author sli
16+ */
1217public final class EnumExtractors {
1318
1419 private EnumExtractors () {}
1520
21+ /**
22+ * @return a singleton {@link EnumExtractor} that does nothing.
23+ */
1624 public static EnumExtractor noOp () {
1725 return input -> Collections .emptySet ();
1826 }
1927
28+ /**
29+ * @return an {@link EnumExtractor} that extracts all the textual {@link JsonNode}s that are valid
30+ * names of a Java {@link Enum}.
31+ */
2032 public static <E extends Enum <E >> EnumExtractor validEnum (@ Nonnull Class <E > enumClass ) {
2133 Objects .requireNonNull (enumClass );
2234 return input -> {
@@ -27,6 +39,9 @@ public static <E extends Enum<E>> EnumExtractor validEnum(@Nonnull Class<E> enum
2739 };
2840 }
2941
42+ /**
43+ * @return an {@link EnumExtractor} that combines the results of the given {@link EnumExtractor}s
44+ */
3045 public static EnumExtractor chained (@ Nonnull EnumExtractor ... enumExtrators ) {
3146 for (EnumExtractor enumExtrator : enumExtrators ) {
3247 Objects .requireNonNull (enumExtrator );
You can’t perform that action at this time.
0 commit comments