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

net.sourceforge.plantuml.klimt.compress.Expand 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.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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy