public static CollectionBufferRenderer create(StringerConfiguration config) { CollectionBufferRenderer renderer = new CollectionBufferRenderer(); renderer.prefixAction = CollectionPrefixAction.create(config); renderer.sequenceRenderer = SequenceBufferRenderer.create( config.getOpeningSequenceSymbol(), config.getClosingSequenceSymbol(), RecursiveRenderIntoBuffer.INSTANCE, false, config); return renderer; }
@Override public void accept(RenderingBuffer buffer, Map.Entry<?, ?> entry) { RecursiveRenderIntoBuffer.INSTANCE.accept(buffer, entry.getKey()); buffer.addPart(config.getKeySeparatorSymbol()); RecursiveRenderIntoBuffer.INSTANCE.accept(buffer, entry.getValue()); }