All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.plantuml.klimt.drawing.eps.PostScriptData Maven / Gradle / Ivy

There is a newer version: 1.2024.8
Show newest version
// 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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy