/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Removes the MapElement with the given name from the given, * lexicographically sorted, MapElement array. * * Name comparisons are performed in a case-insensitive manner. */ private static boolean removeMapIgnoreCase (MapElement[] oldMap, MapElement[] newMap, String name) { CharChunk cc = new CharChunk(); char[] chars = name.toCharArray(); cc.setChars(chars, 0, chars.length); int pos = findIgnoreCase(oldMap, cc); if (pos != -1 && name.equalsIgnoreCase(oldMap[pos].name)) { System.arraycopy(oldMap, 0, newMap, 0, pos); System.arraycopy(oldMap, pos + 1, newMap, pos, oldMap.length - pos - 1); return true; } return false; }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }
/** * Find a map element given its name in a sorted array of map elements. * This will return the index for the closest inferior or equal item in the * given array. */ private static int findIgnoreCase(MapElement[] map, CharChunk name) { return findIgnoreCase(map, name, name.getStart(), name.getEnd()); }