本文整理了Java中org.ovirt.engine.core.compat.Version.less()
方法的一些代码示例,展示了Version.less()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.less()
方法的具体详情如下:
包路径:org.ovirt.engine.core.compat.Version
类名称:Version
方法名:less
暂无
代码示例来源:origin: oVirt/ovirt-engine
/**
* @param oldVersion old compatibility version
* @param newVersion new compatibility version
* @return whether or not update of random/urandom rng device is required;
* false if some of the arguments is null
*/
public static boolean urandomRandomUpdateRequired(Version oldVersion, Version newVersion) {
if (Objects.equals(oldVersion, newVersion)) {
return false;
}
if (oldVersion == null || newVersion == null) {
return false;
}
return (newVersion.greaterOrEquals(VmRngDevice.Source.FIRST_URANDOM_VERSION)
&& oldVersion.less(VmRngDevice.Source.FIRST_URANDOM_VERSION))
|| (oldVersion.greaterOrEquals(VmRngDevice.Source.FIRST_URANDOM_VERSION)
&& newVersion.less(VmRngDevice.Source.FIRST_URANDOM_VERSION));
}
}
代码示例来源:origin: oVirt/ovirt-engine
public boolean isOlderThan(final OS os) {
return getVersion().less(os.getVersion());
}
代码示例来源:origin: oVirt/ovirt-engine
@Test
public void smallerThan() {
assertTrue(Version.v4_2.less(Version.v4_3));
assertFalse(Version.v4_3.less(Version.v4_2));
}
代码示例来源:origin: oVirt/ovirt-engine
private void updateFirewallTypeUponVersionChange(Version version) {
ListModel<FirewallType> firewallType = getFirewallType();
if (version.less(AsyncDataProvider.getInstance().multiFirewallSupportSince())) {
firewallType.setIsChangeable(false);
firewallType.setSelectedItem(FirewallType.IPTABLES);
} else {
firewallType.setIsChangeable(true);
}
}
内容来源于网络,如有侵权,请联系作者删除!