javax.help
Interface Map
- FlatMap, TryMap
A Map is the interface to ID<->URL mapping.
class | Map.ID - An ID is a pair of String, HelpSet.
|
Enumeration | getAllIDs() - Gets an enumeration of all the IDs in a Map.
|
Map.ID | getClosestID(URL url) - Determines the ID that is "closest" to this URL (with a given anchor).
|
Map.ID | getIDFromURL(URL url) - Determines the ID for this URL.
|
Enumeration | getIDs(URL url) - Determines the IDs related to this URL.
|
URL | getURLFromID(Map.ID id) - Gets the URL that corresponds to a given ID in the Map.
|
boolean | isID(URL url) - Determines if the URL corresponds to an ID in the Map.
|
boolean | isValidID(String id, HelpSet hs) - Determines if the ID is valid (defined in the map file).
|
getAllIDs
public Enumeration getAllIDs()
Gets an enumeration of all the IDs in a Map.
- An enumeration of all the IDs in a Map.
getClosestID
public Map.ID getClosestID(URL url)
Determines the ID that is "closest" to this URL (with a given anchor).
The definition of this is up to the implementation of Map. In particular,
it may be the same as getIDFromURL().
- The closest ID in this map to the given URL.
getIDFromURL
public Map.ID getIDFromURL(URL url)
Determines the ID for this URL.
url
- The URL to get the ID for.
- The ID (or null if URL does not correspond to an ID).
getIDs
public Enumeration getIDs(URL url)
Determines the IDs related to this URL.
- Enumeration of Map.Key (Strings/HelpSet)
getURLFromID
public URL getURLFromID(Map.ID id)
throws MalformedURLException
Gets the URL that corresponds to a given ID in the Map.
id
- The ID to get the URL for.
- URL The matching URL. Null if this map cannot solve the ID.
isID
public boolean isID(URL url)
Determines if the URL corresponds to an ID in the Map.
url
- The URL to check on.
- True if this is an ID, false otherwise.
isValidID
public boolean isValidID(String id,
HelpSet hs)
Determines if the ID is valid (defined in the map file).
id
- The String ID.hs
- The HelpSet against which to resolve the string.
- True if the ID is valid, false if not valid.