I'm reading a file, and extract from if some fields that I suppose to store in a tuple. (vavr tuples)
The hashmap does not store any elements. I think I have a problem with initialization that I don't seem to figure out
Hashmap is of Java.util
and the tuple from vavr
Tuple3<HashMap<String, Integer>, HashMap<String, Integer>, List<Tuple2<String, String>>> tupleResourceActivity = traceRecursion
.apply(f, Tuple.of( new HashMap<String, Integer>(),new HashMap<String, Integer>(),new LinkedList<Tuple2<String, String>>()));
The trace recursion function :
traceRecursion = (x, t) -> {
if (x.hasNext()) {
Tuple3<HashMap<String, Integer>, HashMap<String, Integer>, List<Tuple2<String, String>>> tx = evtRecursion
.apply(x.next().iterator(), t);
return traceRecursion.apply(x, tx);
} else {
return t;
}
};
What is it that I'm doing wrong?