![JAR search and dependency download from the Maven repository](/logo.png)
net.sourceforge.plantuml.preproc.NumericCompare 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.preproc;
class NumericCompare {
private final String operator;
public NumericCompare(String operator) {
this.operator = operator;
}
public boolean isCompareOk(int value1, int value2) {
if (operator.equals("<")) {
return value1 < value2;
}
if (operator.equals("<=")) {
return value1 <= value2;
}
if (operator.equals(">")) {
return value1 > value2;
}
if (operator.equals(">=")) {
return value1 >= value2;
}
if (operator.equals("=") || operator.equals("==")) {
return value1 == value2;
}
if (operator.equals("!=") || operator.equals("<>")) {
return value1 != value2;
}
throw new IllegalStateException();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy