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

net.sourceforge.plantuml.sequencediagram.puma.PSegment 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.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();
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy