org.identityconnectors.common.Version.getMinor()方法的使用及代码示例

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

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

Version.getMinor介绍

[英]Returns this version number's minor component.
[中]返回此版本号的次要组件。

代码示例

代码示例来源:origin: Tirasa/ConnId

@Test
public void testComponents() {
  Version v = Version.parse("1.2.3.4");
  assertEquals(v.getMajor(), Integer.valueOf(1));
  assertEquals(v.getMinor(), Integer.valueOf(2));
  assertEquals(v.getMicro(), Integer.valueOf(3));
  assertEquals(v.getRevision(), Integer.valueOf(4));
}

代码示例来源:origin: net.tirasa.connid/connector-framework

new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 1);
return adjacent1.compareTo(ceilingVersion) >= 0;
    new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 1);
return adjacent1.equals(ceilingVersion);
    new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 2);
return adjacent2.compareTo(ceilingVersion) >= 0;

代码示例来源:origin: Tirasa/ConnId

new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 1);
return adjacent1.compareTo(ceilingVersion) >= 0;
    new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 1);
return adjacent1.equals(ceilingVersion);
    new Version(floorVersion.getMajor(), floorVersion.getMinor(), floorVersion
        .getMicro(), floorVersion.getRevision() + 2);
return adjacent2.compareTo(ceilingVersion) >= 0;

代码示例来源:origin: Tirasa/ConnId

@Test
public void testCornerCases() {
  Version v = Version.parse("1.0");
  assertEquals(v.getMajor(), Integer.valueOf(1));
  assertEquals(v.getMinor(), Integer.valueOf(0));
  assertNull(v.getMicro());
  assertNull(v.getRevision());
  try {
    new Version();
    fail();
  } catch (IllegalArgumentException e) {
    // OK.
  }
  try {
    Version.parse(" ");
    fail();
  } catch (IllegalArgumentException e) {
    // OK.
  }
  try {
    Version.parse("foo");
    fail();
  } catch (IllegalArgumentException e) {
    // OK.
  }
}

相关文章