![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.openiconic.SvgCommandNumber 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.openiconic;
import java.util.Locale;
public class SvgCommandNumber implements SvgCommand {
final private String number;
public SvgCommandNumber(String number) {
if (number.matches("[-.0-9e]+") == false) {
throw new IllegalArgumentException();
}
this.number = number;
}
@Override
public String toString() {
return " " + number;
}
public SvgCommandNumber(double number) {
this.number = String.format(Locale.US, "%1.4f", number);
}
public SvgCommandNumber add(SvgCommandNumber other) {
return new SvgCommandNumber(getDouble() + other.getDouble());
}
public String toSvg() {
return number;
}
public double getDouble() {
return Double.parseDouble(number);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy