本文整理了Java中info.magnolia.module.model.Version.getPatch()
方法的一些代码示例,展示了Version.getPatch()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getPatch()
方法的具体详情如下:
包路径:info.magnolia.module.model.Version
类名称:Version
方法名:getPatch
暂无
代码示例来源:origin: info.magnolia/magnolia-core
/**
* Compares major, minor and patch revisions of this Version against the given Version.
* Classifier is ignored.
*/
public boolean isEquivalent(final Version other) {
if (other == UNDEFINED_DEVELOPMENT_VERSION) {
return true;
}
return this.getMajor() == other.getMajor() &&
this.getMinor() == other.getMinor() &&
this.getPatch() == other.getPatch();
}
代码示例来源:origin: info.magnolia/magnolia-core
public boolean isStrictlyAfter(final Version other) {
if (isEquivalent(other)) {
return false;
}
if (this.getMajor() != other.getMajor()) {
return this.getMajor() > other.getMajor();
}
if (this.getMinor() != other.getMinor()) {
return this.getMinor() > other.getMinor();
}
if (this.getPatch() != other.getPatch()) {
return this.getPatch() > other.getPatch();
}
return false;
}
代码示例来源:origin: info.magnolia/magnolia-core
public static VersionMatcher version(String strVersion) {
final Version version = Version.parseVersion(strVersion);
return version().
withMajor(equalTo(version.getMajor())).
withMinor(equalTo(version.getMinor())).
withPatch(equalTo(version.getPatch())).
withClassifier(equalTo(version.getClassifier()));
}
代码示例来源:origin: info.magnolia/magnolia-core
public static void assertVersion(int expectedMajor, int expectedMinor, int expectedPatch, String expectedClassifier, Version actual) {
assertEquals("major revision:", expectedMajor, actual.getMajor());
assertEquals("minor revision:", expectedMinor, actual.getMinor());
assertEquals("minor revision:", expectedPatch, actual.getPatch());
assertEquals("classifier:", expectedClassifier, actual.getClassifier());
}
内容来源于网络,如有侵权,请联系作者删除!