MCPcopy Create free account
hub / github.com/PCGen/pcgen / compareVersions

Method compareVersions

code/src/java/pcgen/core/utils/CoreUtility.java:413–424  ·  view source on GitHub ↗

Compare the two PCGen versions. @param ver The first version @param compVer The second version @return the value 0 if the PCG versions are equal; a value less than 0 if the first version is less than the second version; and a value greater than 0 if the first v

(int[] ver, int[] compVer)

Source from the content-addressed store, hash-verified

411 * version.
412 */
413 public static int compareVersions(int[] ver, int[] compVer)
414 {
415 if (ver[0] != compVer[0])
416 {
417 return Integer.compare(ver[0], compVer[0]);
418 }
419 if (ver[1] != compVer[1])
420 {
421 return Integer.compare(ver[1], compVer[1]);
422 }
423 return Integer.compare(ver[2], compVer[2]);
424 }
425
426 /**
427 * Compare the two PCGen versions.

Callers 7

testCompareVersionsMethod · 0.95
isPriorToCurrentMethod · 0.95
changeAppliesToVerMethod · 0.95
compareVersionToMethod · 0.95
migrateEquipSetsMethod · 0.95
parseLineMethod · 0.95

Calls 3

equalsMethod · 0.65
compareMethod · 0.45

Tested by 2

testCompareVersionsMethod · 0.76