コード例 #1
0
 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;
 }
コード例 #2
0
 @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());
 }