Search in sources :

Example 1 with ChrObjMap

use of suite.primitive.adt.map.ChrObjMap in project suite by stupidsing.

the class ChrOutlet method toListMap.

public <K> ChrObjMap<CharsBuilder> toListMap(Chr_Chr valueFun) {
    ChrObjMap<CharsBuilder> map = new ChrObjMap<>();
    char c;
    while ((c = next()) != ChrFunUtil.EMPTYVALUE) map.computeIfAbsent(c, k_ -> new CharsBuilder()).append(valueFun.apply(c));
    return map;
}
Also used : CharsBuilder(suite.primitive.Chars.CharsBuilder) ChrObjMap(suite.primitive.adt.map.ChrObjMap)

Aggregations

CharsBuilder (suite.primitive.Chars.CharsBuilder)1 ChrObjMap (suite.primitive.adt.map.ChrObjMap)1