net.sourceforge.plantuml.klimt.drawing.eps.PostScriptData Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of plantuml-mit Show documentation
Show all versions of plantuml-mit Show documentation
PlantUML is a component that allows to quickly write diagrams from text.
// THIS FILE HAS BEEN GENERATED BY A PREPROCESSOR.
package net.sourceforge.plantuml.klimt.drawing.eps;
import java.util.ArrayList;
import java.util.List;
public class PostScriptData {
private final List data = new ArrayList<>();
private String toString;
public String toPostString() {
if (this.toString == null) {
this.toString = toPostStringSlow();
}
return this.toString;
}
private String toPostStringSlow() {
final StringBuilder sb = new StringBuilder();
for (PostScriptCommand cmd : data) {
sb.append(cmd.toPostString());
sb.append('\n');
}
return sb.toString();
}
public void add(PostScriptCommand cmd) {
data.add(cmd);
this.toString = null;
}
}