Code example for SortedMap

Methods: firstKey, isEmpty, tailMap

0
  } 
 
  private static void move(SortedMap<String, URL> jars,
      String prefix,
      List<URL> extapi) {
    SortedMap<String, URL> matches = jars.tailMap(prefix);
    if (!matches.isEmpty()) {
      String first = matches.firstKey();
      if (first.startsWith(prefix)) {
        extapi.add(jars.remove(first));
      } 
    } 
  } 
 
  private static String safeName(final ZipEntry ze) {
    // Try to derive the name of the temporary file so it 
    // doesn't completely suck. Best if we can make it 
    // match the name it was in the archive. 
    // 
    String name = ze.getName();
    if (0 <= name.lastIndexOf('/')) {