/** * Adds the given cookie into the given list in descending path order. That * is, more specific path to least specific paths. This may not be the * fastest algorythm, but it'll work OK for the small number of cookies * we're generally dealing with. * * @param list - the list to add the cookie to * @param addCookie - the Cookie to add to list */ private static void addInPathOrder(List list, Cookie addCookie) { int i = 0; for (i = 0; i < list.size(); i++) { Cookie c = (Cookie) list.get(i); if (addCookie.compare(addCookie, c) > 0) { break; } } list.add(i, addCookie); }
/** * Adds the given cookie into the given list in descending path order. That * is, more specific path to least specific paths. This may not be the * fastest algorythm, but it'll work OK for the small number of cookies * we're generally dealing with. * * @param list - the list to add the cookie to * @param addCookie - the Cookie to add to list */ private static void addInPathOrder(List list, Cookie addCookie) { int i = 0; for (i = 0; i < list.size(); i++) { Cookie c = (Cookie) list.get(i); if (addCookie.compare(addCookie, c) > 0) { break; } } list.add(i, addCookie); }
/** * Adds the given cookie into the given list in descending path order. That * is, more specific path to least specific paths. This may not be the * fastest algorythm, but it'll work OK for the small number of cookies * we're generally dealing with. * * @param list - the list to add the cookie to * @param addCookie - the Cookie to add to list */ private static void addInPathOrder(List list, Cookie addCookie) { int i = 0; for (i = 0; i < list.size(); i++) { Cookie c = (Cookie) list.get(i); if (addCookie.compare(addCookie, c) > 0) { break; } } list.add(i, addCookie); }
/** * Adds the given cookie into the given list in descending path order. That * is, more specific path to least specific paths. This may not be the * fastest algorythm, but it'll work OK for the small number of cookies * we're generally dealing with. * * @param list - the list to add the cookie to * @param addCookie - the Cookie to add to list */ private static void addInPathOrder(List list, Cookie addCookie) { int i = 0; for (i = 0; i < list.size(); i++) { Cookie c = (Cookie) list.get(i); if (addCookie.compare(addCookie, c) > 0) { break; } } list.add(i, addCookie); }
/** * Adds the given cookie into the given list in descending path order. That * is, more specific path to least specific paths. This may not be the * fastest algorythm, but it'll work OK for the small number of cookies * we're generally dealing with. * * @param list - the list to add the cookie to * @param addCookie - the Cookie to add to list */ private static void addInPathOrder(List list, Cookie addCookie) { int i = 0; for (i = 0; i < list.size(); i++) { Cookie c = (Cookie) list.get(i); if (addCookie.compare(addCookie, c) > 0) { break; } } list.add(i, addCookie); }