data-generator/datagen-plugin/src/main/java/it/cavallium/datagen/plugin/VersionChangeChecker.java

29 lines
592 B
Java
Raw Normal View History

2023-04-20 10:11:12 +02:00
package it.cavallium.datagen.plugin;
2023-01-19 01:36:57 +01:00
import java.util.Set;
public class VersionChangeChecker {
private final Set<String> changedTypes;
2023-01-20 01:14:37 +01:00
private final int version;
private final int latestVersion;
2023-01-19 01:36:57 +01:00
2023-01-20 01:14:37 +01:00
public VersionChangeChecker(Set<String> changedTypes, int version, int latestVersion) {
2023-01-19 01:36:57 +01:00
this.changedTypes = changedTypes;
2023-01-20 01:14:37 +01:00
this.version = version;
this.latestVersion = latestVersion;
2023-01-19 01:36:57 +01:00
}
public boolean checkChanged(String name) {
return changedTypes.contains(name);
}
2023-01-20 01:14:37 +01:00
public int getVersion() {
return version;
}
public int getLatestVersion() {
return latestVersion;
}
2023-01-19 01:36:57 +01:00
}