net.sourceforge.plantuml.sequencediagram.puma.PSegment 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.sequencediagram.puma;
public class PSegment {
private final double minsize;
private double startx;
private double endx;
public PSegment(double minsize) {
this.minsize = minsize;
this.startx = 0;
this.endx = minsize;
}
public double getMinsize() {
return minsize;
}
public void push(double delta) {
this.startx += delta;
this.endx += delta;
}
public String getDebugPosition() {
return "" + ((int) startx) + "-" + ((int) endx);
}
public double getPosition(double position) {
if (position == 0) {
return startx;
}
if (position == 1) {
return endx;
}
throw new UnsupportedOperationException();
}
}