public int compare(final Object o1, final Object o2) { Cookie c1 = (Cookie) o1; Cookie c2 = (Cookie) o2; String path1 = normalizePath(c1); String path2 = normalizePath(c2); if (path1.equals(path2)) { return 0; } else if (path1.startsWith(path2)) { return -1; } else if (path2.startsWith(path1)) { return 1; } else { // Does not really matter return 0; } }
public int compare(final Object o1, final Object o2) { Cookie c1 = (Cookie) o1; Cookie c2 = (Cookie) o2; String path1 = normalizePath(c1); String path2 = normalizePath(c2); if (path1.equals(path2)) { return 0; } else if (path1.startsWith(path2)) { return -1; } else if (path2.startsWith(path1)) { return 1; } else { // Does not really matter return 0; } }
public int compare(final Object o1, final Object o2) { Cookie c1 = (Cookie) o1; Cookie c2 = (Cookie) o2; String path1 = normalizePath(c1); String path2 = normalizePath(c2); if (path1.equals(path2)) { return 0; } else if (path1.startsWith(path2)) { return -1; } else if (path2.startsWith(path1)) { return 1; } else { // Does not really matter return 0; } }
public int compare(final Object o1, final Object o2) { Cookie c1 = (Cookie) o1; Cookie c2 = (Cookie) o2; String path1 = normalizePath(c1); String path2 = normalizePath(c2); if (path1.equals(path2)) { return 0; } else if (path1.startsWith(path2)) { return -1; } else if (path2.startsWith(path1)) { return 1; } else { // Does not really matter return 0; } }
public int compare(final Object o1, final Object o2) { Cookie c1 = (Cookie) o1; Cookie c2 = (Cookie) o2; String path1 = normalizePath(c1); String path2 = normalizePath(c2); if (path1.equals(path2)) { return 0; } else if (path1.startsWith(path2)) { return -1; } else if (path2.startsWith(path1)) { return 1; } else { // Does not really matter return 0; } }