net.sourceforge.plantuml.code.PairInt 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.code;
public class PairInt {
// ::remove file when __CORE__
private final int x;
private final int y;
public PairInt(int x, int y) {
this.x = x;
this.y = y;
}
public PairInt rotate() {
return new PairInt(-y, x);
}
@Override
public String toString() {
return "(" + x + "," + y + ")";
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public PairInt plus(PairInt other) {
return new PairInt(x + other.x, y + other.y);
}
}