44 lines
1.1 KiB
Java
44 lines
1.1 KiB
Java
package com.psmreborn.pscertified;
|
|
|
|
|
|
public class CertifiedDeviceEntry {
|
|
String deviceName = null;
|
|
int maxApiVersion = Integer.MAX_VALUE;
|
|
int minApiVersion = 0;
|
|
|
|
public String getDeviceName(){
|
|
return deviceName;
|
|
}
|
|
public int getMinApiVersion(){
|
|
return minApiVersion;
|
|
}
|
|
public int getMaxApiVersion(){
|
|
return maxApiVersion;
|
|
}
|
|
|
|
public boolean checkDevice(String device, int osVer){
|
|
if(deviceName.equals(device)){
|
|
if(osVer < maxApiVersion){
|
|
if(osVer > minApiVersion){
|
|
return true;
|
|
}
|
|
}
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public CertifiedDeviceEntry(String deviceName, int minApiVersion, int maxApiVersion) {
|
|
this.deviceName = deviceName;
|
|
this.minApiVersion = minApiVersion;
|
|
this.maxApiVersion = maxApiVersion;
|
|
}
|
|
|
|
public CertifiedDeviceEntry(String deviceName, int minApiVersion) {
|
|
this.deviceName = deviceName;
|
|
this.minApiVersion = minApiVersion;
|
|
}
|
|
|
|
public CertifiedDeviceEntry(String deviceName) {
|
|
this.deviceName = deviceName;
|
|
}
|
|
} |