private ResourceIndexEntry findClosestMatch(String resourceName){
  ResourceIndexEntry resourceIndexEntry=null;
  Iterator iter=topLevelEntries.iterator();
  boolean processed=false;
  while ((!processed) && (iter.hasNext())) {
    ResourceIndexEntry tle=(ResourceIndexEntry)iter.next();
    resourceIndexEntry=tle.findClosestMatch(resourceType,resourceName);
    if (resourceIndexEntry != null) {
      processed=true;
    }
  }
  return resourceIndexEntry;
}

private ResourceIndexEntry findClosestMatch ( String resourceName ) { ResourceIndexEntry resourceIndexEntry = null ; Iterator iter = topLevelEntries . iterator ( ) ; boolean processed = false ; while ( ( ! processed ) && ( iter . hasNext ( ) ) ) { ResourceIndexEntry tle = ( ResourceIndexEntry ) iter . next ( ) ; resourceIndexEntry = tle . findClosestMatch ( resourceType , resourceName ) ; if ( resourceIndexEntry != null ) { processed = true ; } } return resourceIndexEntry ; }
finds the index entry with closest matching resource name for a given resource name known problem : if the resourcename happens to be a super resource of more than one top level entry , one top level entry is returned . which top level entry is returned is indeterminate
