skadistats.clarity.model.GameVersionRange Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clarity Show documentation
Show all versions of clarity Show documentation
Clarity is an open source replay parser for Dota 2, CSGO, CS2 and Deadlock written in Java.
package skadistats.clarity.model;
public class GameVersionRange {
private final Integer start;
private final Integer end;
public GameVersionRange(Integer start, Integer end) {
this.start = start;
this.end = end;
}
public boolean appliesTo(int gameVersion) {
if (start == null && end == null) return true;
return gameVersion != -1 && (start == null || start <= gameVersion) && (end == null || end >= gameVersion);
}
}