Ejemplo n.º 1
0
 @Override
 public RenderingBuffer render(Collection collection) {
   ListRenderingBuffer buffer = ListRenderingBuffer.create();
   int collectionSize = collection.size();
   prefixAction.accept(buffer, collectionSize);
   this.sequenceRenderer.render(buffer, collection.iterator(), collectionSize);
   return buffer;
 }
Ejemplo n.º 2
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;
 }