Code example for Joiner

Methods: join

0
 
        // lines: ["61 62 63", ...] 
        Iterable<String> lines = transform(hexLines, joinerFunction(HEX_BYTE_JOINER));
 
        // joined: "61 62 63\n..." 
        return HEX_LINE_JOINER.join(lines);
    } 
 
    private static Function<Iterable<String>, String> joinerFunction(final Joiner joiner)
    { 
        return new Function<Iterable<String>, String>()
        { 
            @Override 
            public String apply(Iterable<String> iterable)
            { 
                return joiner.join(iterable);
            } 
        }; 
    }