本文整理了Java中com.yahoo.component.Version.getMicro()
方法的一些代码示例,展示了Version.getMicro()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getMicro()
方法的具体详情如下:
包路径:com.yahoo.component.Version
类名称:Version
方法名:getMicro
[英]Returns the micro component of this version, or 0 if not specified
[中]返回此版本的微组件,如果未指定,则返回0
代码示例来源:origin: com.yahoo.vespa/node-repository
/**
* A version 6.163.20 will be returned as a number 163.020. The major
* version can normally be inferred. As long as the micro version stays
* below 1000 these numbers sort like Version.
*/
private static double getVersionAsNumber(Version version) {
return version.getMinor() + version.getMicro() / 1000.0;
}
代码示例来源:origin: com.yahoo.vespa/component
/**
* Returns the string representation of this version identifier as major.minor.micro.qualifier,
* omitting .qualifier if qualifier empty or unspecified
* <p>
* This string form is part of the API of Version and will never change.
*/
public String toFullString() {
StringBuilder b = new StringBuilder();
b.append(getMajor());
b.append(".");
b.append(getMinor());
b.append(".");
b.append(getMicro());
if (! qualifier.isEmpty()) {
b.append(".");
b.append(qualifier);
}
return b.toString();
}
代码示例来源:origin: com.yahoo.vespa/component
private String toStringValue() {
StringBuilder b = new StringBuilder();
if (! qualifier.isEmpty()) {
b.append(getMajor());
b.append(".");
b.append(getMinor());
b.append(".");
b.append(getMicro());
b.append(".");
b.append(qualifier);
} else if (getMicro() != 0) {
b.append(getMajor());
b.append(".");
b.append(getMinor());
b.append(".");
b.append(getMicro());
} else if (getMinor() != 0) {
b.append(getMajor());
b.append(".");
b.append(getMinor());
} else if (getMajor() != 0) {
b.append(getMajor());
}
return b.toString();
}
代码示例来源:origin: com.yahoo.vespa/component
/** Creates a version specification that only matches this version */
public VersionSpecification toSpecification() {
if (this == emptyVersion)
return VersionSpecification.emptyVersionSpecification;
else {
return new VersionSpecification(getMajor(), getMinor(), getMicro(), getQualifier());
}
}
代码示例来源:origin: com.yahoo.vespa/component
if (result != 0) return result;
result = this.getMicro() - other.getMicro();
if (result != 0) return result;
代码示例来源:origin: com.yahoo.vespa/component
/**
* Returns true if the given version matches this specification.
* It matches if all the numeric components specified are the same
* as in the version, and both qualifiers are either null or set
* to the same value. I.e, a version which includes a qualifier
* will only match exactly and will never return true from a
* request for an unspecified qualifier.
*/
public boolean matches(Version version) {
if (matches(this.major, version.getMajor()) &&
matches(this.minor, version.getMinor()) &&
matches(this.micro, version.getMicro()))
{
return (version.getQualifier().equals(this.getQualifier()));
} else {
return false;
}
}
内容来源于网络,如有侵权,请联系作者删除!