net.sourceforge.plantuml.klimt.drawing.eps.PostScriptCommandMacro 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;
public class PostScriptCommandMacro implements PostScriptCommand {
// ::remove folder when __HAXE__
final private String name;
final private PostScriptData data = new PostScriptData();
public PostScriptCommandMacro(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void add(PostScriptCommand cmd) {
data.add(cmd);
}
public String toPostString() {
return name;
}
public String getPostStringDefinition() {
final StringBuilder sb = new StringBuilder();
sb.append("/" + name + " {\n");
sb.append(data.toPostString());
sb.append("} def\n");
return sb.toString();
}
@Override
public int hashCode() {
return data.toPostString().hashCode();
}
@Override
public boolean equals(Object obj) {
final PostScriptCommandMacro other = (PostScriptCommandMacro) obj;
return this.data.toPostString().equals(other.data.toPostString());
}
}