org.elasticsearch.Version.isAlpha()方法的使用及代码示例

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

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

Version.isAlpha介绍

[英]Returns true iff this version is an alpha version Note: This has been introduced in elasticsearch version 5. Previous versions will never have an alpha version.
[中]如果此版本是alpha版本,则返回true注意:这已在elasticsearch版本5中引入。以前的版本永远不会有alpha版本。

代码示例

代码示例来源:origin: org.elasticsearch/elasticsearch

@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append(major).append('.').append(minor).append('.').append(revision);
  if (isAlpha()) {
    sb.append("-alpha");
    sb.append(build);
  } else if (isBeta()) {
    if (major >= 2) {
      sb.append("-beta");
    } else {
      sb.append(".Beta");
    }
    sb.append(major < 5 ? build : build-25);
  } else if (build < 99) {
    if (major >= 2) {
      sb.append("-rc");
    } else {
      sb.append(".RC");
    }
    sb.append(build - 50);
  }
  return sb.toString();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.elasticsearch

@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append(major).append('.').append(minor).append('.').append(revision);
  if (isAlpha()) {
    sb.append("-alpha");
    sb.append(build);
  } else if (isBeta()) {
    if (major >= 2) {
      sb.append("-beta");
    } else {
      sb.append(".Beta");
    }
    sb.append(major < 5 ? build : build-25);
  } else if (build < 99) {
    if (major >= 2) {
      sb.append("-rc");
    } else {
      sb.append(".RC");
    }
    sb.append(build - 50);
  }
  return sb.toString();
}

代码示例来源:origin: com.strapdata.elasticsearch/elasticsearch

@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append(major).append('.').append(minor).append('.').append(revision);
  if (isAlpha()) {
    sb.append("-alpha");
    sb.append(build);
  } else if (isBeta()) {
    if (major >= 2) {
      sb.append("-beta");
    } else {
      sb.append(".Beta");
    }
    sb.append(major < 5 ? build : build-25);
  } else if (build < 99) {
    if (major >= 2) {
      sb.append("-rc");
    } else {
      sb.append(".RC");
    }
    sb.append(build - 50);
  }
  return sb.toString();
}

代码示例来源:origin: apache/servicemix-bundles

@Override
public String toString() {
  StringBuilder sb = new StringBuilder();
  sb.append(major).append('.').append(minor).append('.').append(revision);
  if (isAlpha()) {
    sb.append("-alpha");
    sb.append(build);
  } else if (isBeta()) {
    if (major >= 2) {
      sb.append("-beta");
    } else {
      sb.append(".Beta");
    }
    sb.append(major < 5 ? build : build-25);
  } else if (build < 99) {
    if (major >= 2) {
      sb.append("-rc");
    } else {
      sb.append(".RC");
    }
    sb.append(build - 50);
  }
  return sb.toString();
}

相关文章