11 questions
Score of 2
1 answer
109 views
Read line from Stdin with Cactoos
I'm searching for an approach to read single line from Stdin using the Cactoos library.
I can do something like this:
System.out.println(
new TextOf(
new ReaderOf(
new Stdin()
)
)....
Score of 1
1 answer
84 views
How to get lines from a file except lines starting with # using only cactoos
The task is to get all the lines from the file except the lines starting with #, using only the cactoos library.
I got the following solution:
Iterable<Text> data =
new ...
Score of 3
2 answers
438 views
Replace null with empty String decorator
Is there in Cactoos framework some Text decorator (or maybe some other way), which replace null string with empty string? Like Strings.nullToEmpty function in Google Guava.
I have found NoNulls ...
Score of 2
1 answer
53 views
Cactoos Checkstyle Configuration File
I've installed the checkstyle-idea (v8.16) for IntelliJ, there are two options of Configuration files, 'Sun Checks' and 'Google Checks'.
Is there a specific file for Cactoos project? Because both ...
Score of 3
1 answer
164 views
Cactoos flatMap analogy
Is there flatMap analogy in Cactoos library? I need exactly what flatMap can, but without streams:
The flatMap() operation has the effect of applying a one-to-many transformation to the elements of ...
Score of 2
1 answer
107 views
How to retrieve strings from file after the blank string with cactoos?
I have a file, which is formatted like this:
header line 1
header line 2
header line 3
line 1
line 2
line 3
...
I need to get Iterable<String> with those lines (line 1, line 2, line 3 etc.), ...
Score of 2
2 answers
88 views
Is it possible to compare 'contains' text in cactoos?
I'm looking for some sort of OO equivalent to the apache commons utility, which is the common way of handling this in java:
StringUtils.containsIgnoreCase("foobar", "OOB")
Is there a way to do this ...
Score of 2
3 answers
304 views
Calculate SumOfInts from Iterable
I need to calculate sum of Iterable<Integer>.
final Iterable<Integer> score = this.points()
final sum = new SumOfInts(...).value()
How can I do this using class SumOfInts?
Score of 2
1 answer
150 views
Warning thrown by using multiple Iterables on Cactoos Joined class
While refactoring Rultor to use Cactoos instead of Guava, Iâm having an issue with DockerRun class, in the envs method.
The current refactored result is:
final List<String> entries = new ...
Score of 4
2 answers
1266 views
UncheckedIOException is thrown instead of a different expected exception
While refactoring Rultor to use Cactoos instead of Guava, Iâm having an issue with negative tests of GithubProfileTest and GithubProfileValidationTest.
After the refactor, the positive test cases ...
Score of 5
2 answers
522 views
Refactoring Guava's Iterables.transform and Function to equivalent in Cactoos
I'm refactoring some usages of Google Guava library to Cactoos library and I'm having difficulty figuring out the equivalent implementation of both Function class and Iterables.transform method, using ...