## javax.help
Interface Map

All Known Implementing Classes:
  FlatMap, TryMap

public interface Map

A Map is the interface to ID<->URL mapping.

Nested Class Summary
`static class` `Map.ID` An ID is a pair of String, HelpSet.

Method Summary
`java.util.Enumeration` `getAllIDs()` Gets an enumeration of all the IDs in a Map.
`Map.ID` `getClosestID(java.net.URL url)` Determines the ID that is "closest" to this URL (with a given anchor).
`Map.ID` `getIDFromURL(java.net.URL url)` Determines the ID for this URL.
`java.util.Enumeration` `getIDs(java.net.URL url)` Determines the IDs related to this URL.
`java.net.URL` `getURLFromID(Map.ID id)` Gets the URL that corresponds to a given ID in the Map.
`boolean` `isID(java.net.URL url)` Determines if the URL corresponds to an ID in the Map.
`boolean` `isValidID(java.lang.String id, HelpSet hs)` Determines if the ID is valid (defined in the map file).

Method Detail

### isValidID

    public boolean isValidID(java.lang.String id,
                             HelpSet hs)

  Determines if the ID is valid (defined in the map file).

  Parameters:
    `id` - The String ID.
    `hs` - The HelpSet against which to resolve the string.
  Returns:
    True if the ID is valid, false if not valid.

### getAllIDs

    public java.util.Enumeration getAllIDs()

  Gets an enumeration of all the IDs in a Map.

  Returns:
    An enumeration of all the IDs in a Map.

### getURLFromID

    public java.net.URL getURLFromID(Map.ID id)
                              throws java.net.MalformedURLException

  Gets the URL that corresponds to a given ID in the Map.

  Parameters:
    `id` - The ID to get the URL for.
  Returns:
    URL The matching URL. Null if this map cannot solve the ID.
  Throws:
    `java.net.MalformedURLException` - if the URL is malformed

### isID

    public boolean isID(java.net.URL url)

  Determines if the URL corresponds to an ID in the Map.

  Parameters:
    `url` - The URL to check on.
  Returns:
    True if this is an ID, false otherwise.

### getIDFromURL

    public Map.ID getIDFromURL(java.net.URL url)

  Determines the ID for this URL.

  Parameters:
    `url` - The URL to get the ID for.
  Returns:
    The ID (or null if URL does not correspond to an ID).

### getClosestID

    public Map.ID getClosestID(java.net.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().

  Parameters:
    `url` - A URL
  Returns:
    The closest ID in this map to the given URL.

### getIDs

    public java.util.Enumeration getIDs(java.net.URL url)

  Determines the IDs related to this URL.

  Returns:
    Enumeration of Map.Key (Strings/HelpSet)