/** * A location within a HelpSet. If id or hs are null, a null ID is returned. * * @param id The String * @param hs The HelpSet * @exception BadIDException if String is not within the Map of the * HelpSet. */ public static ID create(String id, HelpSet hs) throws BadIDException { if (hs == null || id == null) { return null; } Map map = hs.getCombinedMap(); if (! map.isValidID(id, hs)) { throw new BadIDException("Not valid ID: "+id, map, id, hs); } return new ID(id, hs); }