com.fasterxml.jackson.core.Version.compareTo()方法的使用及代码示例

x33g5p2x  于2022-01-31 转载在 其他  
字(1.6k)|赞(0)|评价(0)|浏览(109)

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

Version.compareTo介绍

暂无

代码示例

代码示例来源:origin: stagemonitor/stagemonitor

public static <T> ObjectReader getObjectReader(Class<T> type) {
  final ObjectReader objectReader;
  if (getMapper().version().compareTo(new Version(2, 6, 0, null, "com.fasterxml.jackson.core", "jackson-databind")) >= 0) {
    objectReader = getMapper().readerFor(type);
  } else {
    objectReader = getMapper().reader(type);
  }
  return objectReader;
}
private static class AfterburnerModuleRegisterer {

代码示例来源:origin: org.umlg/sqlg-core

private void updateTopology(String oldVersion) {
  Version v = Version.unknownVersion();
  if (oldVersion != null) {
    v = VersionUtil.parseVersion(oldVersion, null, null);
  }
  if (v.isUnknownVersion() || v.compareTo(new Version(1, 5, 0, null, null, null)) < 0) {
    if (this.sqlDialect.supportsDeferrableForeignKey()) {
      upgradeForeignKeysToDeferrable();
    }
  }
  if (v.isUnknownVersion() || v.compareTo(new Version(2, 0, 0, null, null, null)) < 0) {
    addPartitionSupportToSqlgSchema();
  }
}

代码示例来源:origin: pietermartin/sqlg

private void updateTopology(String oldVersion) {
  Version v = Version.unknownVersion();
  if (oldVersion != null) {
    v = VersionUtil.parseVersion(oldVersion, null, null);
  }
  if (v.isUnknownVersion() || v.compareTo(new Version(1, 5, 0, null, null, null)) < 0) {
    if (this.sqlDialect.supportsDeferrableForeignKey()) {
      upgradeForeignKeysToDeferrable();
    }
  }
  if (v.isUnknownVersion() || v.compareTo(new Version(2, 0, 0, null, null, null)) < 0) {
    addPartitionSupportToSqlgSchema();
  }
}

相关文章