net.sourceforge.plantuml.klimt.compress.Expand 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.compress;
public class Expand implements Comparable {
// ::remove file when __HAXE__
private final double position;
private final double extend;
private final ExpandType type;
public Expand(ExpandType type, double position, double extend) {
if (extend <= 0) {
throw new IllegalArgumentException();
}
this.type = type;
this.position = position;
this.extend = extend;
}
@Override
public String toString() {
return "(" + position + "==>+" + extend + " " + type + ")";
}
public int compareTo(Expand other) {
if (this.position < other.position) {
return -1;
}
if (this.position > other.position) {
return 1;
}
return 0;
}
public final double getPosition() {
return position;
}
public final double getExtend() {
return extend;
}
public final ExpandType getType() {
return type;
}
}