added some util functions

This commit is contained in:
FlorianMichael 2023-02-24 23:11:44 +01:00
parent d67ee42b27
commit 09992023c8
2 changed files with 11 additions and 0 deletions

View File

@ -36,6 +36,13 @@ public class ProtocolRange {
return true;
}
public ProtocolRange[] inverse() {
return new ProtocolRange[] {
ProtocolRange.andNewer(lowerBound),
ProtocolRange.andOlder(upperBound)
};
}
@Override
public String toString() {
if (lowerBound == null) return upperBound.getName() + "+";

View File

@ -49,4 +49,8 @@ public class ProtocolSyncBooleanValue extends AbstractValue<Boolean> {
public void setSyncWithProtocol(boolean syncWithProtocol) {
this.syncWithProtocol = syncWithProtocol;
}
public ProtocolRange getProtocolRange() {
return protocolRange;
}
}