Version implements Comparable<Version>, Serializable { @SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX") public int getMajor() { return (int) components[0]; } Version(final String version);  Version(final CharSequence version); @Override @SuppressWarnings("unchecked") int compareTo(final Version o); @Override int hashCode(); @Override boolean equals(final Object obj); String getImage(); Comparable[] getComponents(); Comparable getComponent(final int pos); @SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX") int getMajor(); @SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX") int getMinor(); @SuppressFBWarnings("CLI_CONSTANT_LIST_INDEX") int getPatch(); int getNrComponents(); @Override String toString();  }
@Test public void testVersion4() { Version version = new Version(org.spf4j.base.Runtime.JAVA_VERSION); Assert.assertTrue(version.getMajor() > 0); Version clone = Objects.clone(version); Assert.assertEquals(version, clone); }