File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
biojava-structure/src/main/java/org/biojava/nbio/structure/align/ce Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change 4444import java .util .ArrayList ;
4545import java .util .Iterator ;
4646import java .util .List ;
47+ import java .util .stream .Stream ;
4748
4849
4950/**
@@ -796,12 +797,9 @@ public String printHelp() {
796797 Iterator <String > helpIt = paramHelp .iterator ();
797798
798799 buf .append ("--- " ).append (alg .getAlgorithmName ()).append (" parameters: ---" ).append (newline );
799- for (int i = 0 ; i < size ; i ++) {
800- String name = namesIt .next ();
801- buf .append (" -" ).append (Introspector .decapitalize (name ));
802- buf .append (" " ).append (helpIt .next ());
803- buf .append (newline );
804- }
800+ Stream .iterate (0 , n -> n + 1 ).limit (size )
801+ .map (i -> namesIt .next ())
802+ .forEach (name -> buf .append (" -" ).append (Introspector .decapitalize (name )).append (" " ).append (helpIt .next ()).append (newline ));
805803 }
806804 buf .append (newline );
807805
You can’t perform that action at this time.
0 commit comments