File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
src/main/java/io/github/dgroup/term4j/arg Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 2424
2525package io .github .dgroup .term4j .arg ;
2626
27+ import io .github .dgroup .term4j .Arg ;
28+ import java .util .Collection ;
2729import java .util .List ;
2830import java .util .Set ;
2931
@@ -52,7 +54,19 @@ public SetOf(final String lbl, final List<String> args) {
5254 * @param args All command-line arguments.
5355 */
5456 public SetOf (final String lbl , final String delim , final List <String > args ) {
55- super (lbl , args , val -> new org .cactoos .set .SetOf <>(val .split (delim )));
57+ this (new Strings (lbl , delim , args ));
58+ }
59+
60+ /**
61+ * Ctor.
62+ * @param arg The command-line argument.
63+ */
64+ public SetOf (final Arg <Collection <String >> arg ) {
65+ super (new ArgOf <Set <String >>(
66+ arg ::label ,
67+ () -> new org .cactoos .set .SetOf <>(arg .value ()),
68+ arg ::specifiedByUser
69+ ));
5670 }
5771
5872}
You can’t perform that action at this time.
0 commit comments