com.yahoo.component.Version.getMajor()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.9k)|赞(0)|评价(0)|浏览(100)

本文整理了Java中com.yahoo.component.Version.getMajor()方法的一些代码示例,展示了Version.getMajor()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Version.getMajor()方法的具体详情如下:
包路径:com.yahoo.component.Version
类名称:Version
方法名:getMajor

Version.getMajor介绍

[英]Returns the major component of this version, or 0 if not specified
[中]返回此版本的主要组件,如果未指定,则返回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/config-application-package

File schemaPath = new File(pathPrefix + "version/" + vespaVersion.getMajor() + ".x/schema/");

代码示例来源: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/documentapi

if (version.getMajor() >= 5) {
  in = DocumentDeserializerFactory.createHead(docMan, GrowableByteBuffer.wrap(data));
} else {

代码示例来源:origin: com.yahoo.vespa/component

if (other == this) return 0;
int result = this.getMajor() - other.getMajor();
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;
  }
}

代码示例来源:origin: com.yahoo.vespa/documentapi

if (version.getMajor() >= 5) {
  out = DocumentSerializerFactory.createHead(new GrowableByteBuffer(8192));
} else {

相关文章