2 * JavaInspect - Utility to visualize java software
3 * Copyright (C) 2013-2018, Svjatoslav Agejenko, svjatoslav@svjatoslav.eu
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of version 3 of the GNU Lesser General Public License
7 * or later as published by the Free Software Foundation.
10 package eu.svjatoslav.inspector.java.methods;
12 public class EnumerationBuffer {
14 private final String enumerationDelimiter;
16 private final StringBuffer buffer = new StringBuffer();
18 public int enumeratedEntitiesCount = 0;
20 public EnumerationBuffer() {
24 public EnumerationBuffer(final String enumerationDelimiter) {
25 this.enumerationDelimiter = enumerationDelimiter;
28 public void append(final String value) {
32 public void appendEnumeration(final String value) {
33 if (enumeratedEntitiesCount > 0)
34 buffer.append(enumerationDelimiter);
37 enumeratedEntitiesCount++;
40 public void resetEnumeration() {
41 enumeratedEntitiesCount = 0;
45 public String toString() {
46 return buffer.toString();