File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
src/main/java/com/github/javacodekata/lambda/stream Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -20,14 +20,36 @@ public static ListTransformer of(List<String> values) {
2020 return new ListTransformer (ImmutableList .copyOf (values ));
2121 }
2222
23+ /**
24+ * This method should take the String List and sort all the String elements in ascending (ASCII) order.
25+ * @return The sorted values in ascending ASCII order.
26+ */
2327 public List <String > getSortedStrings () {
2428 return values ;
2529 }
2630
31+ /**
32+ * This method should take the String List and:
33+ * <ol>
34+ * <li>filter the elements that contains one or more digits;</li>
35+ * <li>transform (map) the remaining Strings into Integers;</li>
36+ * <li>sort the Integers in ascending order.</li>
37+ * </ol>
38+ * @return
39+ */
2740 public List <Integer > getSortedIntegers () {
2841 return new LinkedList <>();
2942 }
3043
44+ /**
45+ * This method should take the String List and:
46+ * <ol>
47+ * <li>filter the elements that contains one or more digits;</li>
48+ * <li>transform (map) the remaining Strings into Integers;</li>
49+ * <li>sort the Integers in descending order.</li>
50+ * </ol>
51+ * @return
52+ */
3153 public List <Integer > getSortedDescendingIntegers () {
3254 return new LinkedList <>();
3355 }
You can’t perform that action at this time.
0 commit comments