Package net.sf.robocode.util

Examples of net.sf.robocode.util.AlphanumericComparator.compare()


  private static int compare(String p1, String c1, String v1, String p2, String c2, String v2) {
    AlphanumericComparator alphaNumComparator = new AlphanumericComparator();

    // Compare packages
    int result = alphaNumComparator.compare(p1, p2);

    if (result != 0) {
      return result;
    }
View Full Code Here


    if (result != 0) {
      return result;
    }

    // Same package, so compare classes
    result = alphaNumComparator.compare(c1, c2);
    if (result != 0) {
      return result;
    }

    // Same robot, so compare versions
View Full Code Here

    if (v1.equals(v2)) {
      return 0;
    }

    if (v1.indexOf(".") < 0 || v2.indexOf(".") < 0) {
      return alphaNumComparator.compare(v1, v2);
    }

    // Dot separated versions.
    StringTokenizer s1 = new StringTokenizer(v1, ".");
    StringTokenizer s2 = new StringTokenizer(v2, ".");
View Full Code Here

        if (i1 != i2) {
          return i1 - i2;
        }
      } catch (NumberFormatException e) {
        int tc = alphaNumComparator.compare(tok1, tok2);

        if (tc != 0) {
          return tc;
        }
      }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.