本文整理了Java中com.github.zafarkhaja.semver.Version.greaterThanOrEqualTo()
方法的一些代码示例,展示了Version.greaterThanOrEqualTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.greaterThanOrEqualTo()
方法的具体详情如下:
包路径:com.github.zafarkhaja.semver.Version
类名称:Version
方法名:greaterThanOrEqualTo
[英]Checks if this version is greater than or equal to the other version.
[中]检查此版本是否大于或等于其他版本。
代码示例来源:origin: Graylog2/graylog2-server
/**
* @see com.github.zafarkhaja.semver.Version#greaterThanOrEqualTo(com.github.zafarkhaja.semver.Version)
*/
public boolean sameOrHigher(Version other) {
if (isNullOrEmpty(version.getPreReleaseVersion())) {
return version.greaterThanOrEqualTo(other.getVersion());
} else {
// If this is a pre-release version, use the major.minor.patch version for comparison with the other.
// This allows plugins to require a server version of 2.1.0 and it still gets loaded on a 2.1.0-beta.2 server.
// See: https://github.com/Graylog2/graylog2-server/issues/2462
return com.github.zafarkhaja.semver.Version.valueOf(version.getNormalVersion()).greaterThanOrEqualTo(other.getVersion());
}
}
代码示例来源:origin: syncany/syncany
boolean applicationVersionCompatible = applicationVersion.greaterThanOrEqualTo(remoteMinAppVersion);
boolean pluginIsOutdated = localVersionOutdated && applicationVersionCompatible;
代码示例来源:origin: org.kurento/kurento-module-creator
/**
* Checks if the current version is greater than or equal to the parsed version.
*
* @param version
* the version to compare to, the left-hand operand of the "greater than or equal to"
* operator
* @return {@code true} if the version is greater than or equal to the parsed version or
* {@code false} otherwise
*/
@Override
public boolean interpret(Version version) {
return version.greaterThanOrEqualTo(parsedVersion);
}
代码示例来源:origin: zafarkhaja/jsemver
/**
* Checks if the current version is greater
* than or equal to the parsed version.
*
* @param version the version to compare to, the left-hand operand
* of the "greater than or equal to" operator
* @return {@code true} if the version is greater than or equal
* to the parsed version or {@code false} otherwise
*/
@Override
public boolean interpret(Version version) {
return version.greaterThanOrEqualTo(parsedVersion);
}
}
代码示例来源:origin: com.github.zafarkhaja/java-semver
/**
* Checks if the current version is greater
* than or equal to the parsed version.
*
* @param version the version to compare to, the left-hand operand
* of the "greater than or equal to" operator
* @return {@code true} if the version is greater than or equal
* to the parsed version or {@code false} otherwise
*/
@Override
public boolean interpret(Version version) {
return version.greaterThanOrEqualTo(parsedVersion);
}
}
代码示例来源:origin: infinum/Android-Prince-of-Versions
public boolean isGreaterThanOrEqualsTo(Version version) {
return this.version.greaterThanOrEqualTo(version.version);
}
代码示例来源:origin: org.ajoberstar/semver-vcs-api
/**
* @return a versioner that will validate that the base is greater than
* the VCS's previous version (if available). If it's not greater than or
* equal to an exception will be thrown.
*/
public static Versioner enforcePrecedence() {
return (base, vcs) -> {
Version previous = vcs.getPreviousVersion().orElse(base);
if (base.greaterThanOrEqualTo(previous)) {
return base;
} else {
throw new IllegalArgumentException("Inferred version (" + base + ") must have higher precedence than previous (" + previous + ")");
}
};
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-core
private void verifyDockerComposeVersionAtLeast(Version targetVersion, String message) throws IOException, InterruptedException {
validState(version().greaterThanOrEqualTo(targetVersion), message);
}
代码示例来源:origin: org.graylog2/graylog2-server
/**
* @see com.github.zafarkhaja.semver.Version#greaterThanOrEqualTo(com.github.zafarkhaja.semver.Version)
*/
public boolean sameOrHigher(Version other) {
if (isNullOrEmpty(version.getPreReleaseVersion())) {
return version.greaterThanOrEqualTo(other.getVersion());
} else {
// If this is a pre-release version, use the major.minor.patch version for comparison with the other.
// This allows plugins to require a server version of 2.1.0 and it still gets loaded on a 2.1.0-beta.2 server.
// See: https://github.com/Graylog2/graylog2-server/issues/2462
return com.github.zafarkhaja.semver.Version.valueOf(version.getNormalVersion()).greaterThanOrEqualTo(other.getVersion());
}
}
代码示例来源:origin: palantir/docker-compose-rule
private void verifyDockerComposeVersionAtLeast(Version targetVersion, String message) throws IOException, InterruptedException {
validState(version().greaterThanOrEqualTo(targetVersion), message);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
private void verifyDockerComposeVersionAtLeast(Version targetVersion, String message) throws IOException, InterruptedException {
validState(version().greaterThanOrEqualTo(targetVersion), message);
}
代码示例来源:origin: palantir/docker-compose-rule
private Process followLogs(String container) throws IOException, InterruptedException {
if (version().greaterThanOrEqualTo(VERSION_1_7_0)) {
return rawExecutable.execute("logs", "--no-color", "--follow", container);
}
return rawExecutable.execute("logs", "--no-color", container);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule
private Process followLogs(String container) throws IOException, InterruptedException {
if (version().greaterThanOrEqualTo(VERSION_1_7_0)) {
return rawExecutable.execute("logs", "--no-color", "--follow", container);
}
return rawExecutable.execute("logs", "--no-color", container);
}
代码示例来源:origin: com.palantir.docker.compose/docker-compose-rule-core
private Process followLogs(String container) throws IOException, InterruptedException {
if (version().greaterThanOrEqualTo(VERSION_1_7_0)) {
return rawExecutable.execute("logs", "--no-color", "--follow", container);
}
return rawExecutable.execute("logs", "--no-color", container);
}
代码示例来源:origin: org.springframework.cloud/spring-cloud-deployer-cloudfoundry
@Bean
@ConditionalOnMissingBean(TaskLauncher.class)
public TaskLauncher taskLauncher(CloudFoundryClient client,
CloudFoundryOperations operations,
Version version) {
if (version.greaterThanOrEqualTo(UnsupportedVersionTaskLauncher.MINIMUM_SUPPORTED_VERSION)) {
RuntimeEnvironmentInfo runtimeEnvironmentInfo = runtimeEnvironmentInfo(TaskLauncher.class, CloudFoundry2630AndLaterTaskLauncher.class);
return new CloudFoundry2630AndLaterTaskLauncher(
client,
connectionConfiguration.taskDeploymentProperties(),
operations,
runtimeEnvironmentInfo);
} else {
RuntimeEnvironmentInfo runtimeEnvironmentInfo = runtimeEnvironmentInfo(TaskLauncher.class, UnsupportedVersionTaskLauncher.class);
return new UnsupportedVersionTaskLauncher(version, runtimeEnvironmentInfo);
}
}
内容来源于网络,如有侵权,请联系作者删除!