public class TryMap extends java.lang.Object implements Map, java.io.Serializable
Constructor and Description |
---|
TryMap()
Creates an empty Map.
|
Modifier and Type | Method and Description |
---|---|
void |
add(Map map)
Adds a map to a "filter" Map.
|
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)
Gets the the IDs related to this URL.
|
java.util.Enumeration |
getMaps()
Enumerates all the Maps in this TryMap.
|
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 (known to in the project file).
|
boolean |
remove(Map map)
Removes a Map from this "filter" Map.
|
public TryMap()
public void add(Map map)
map
- The new Map to add. If Map is null it is not added.public boolean remove(Map map)
map
- The Map to add.public java.util.Enumeration getMaps()
public boolean isValidID(java.lang.String id, HelpSet hs)
public java.util.Enumeration getAllIDs()
public java.net.URL getURLFromID(Map.ID id) throws java.net.MalformedURLException
getURLFromID
in interface Map
id
- The ID for which to get the URL. If id is null it is
treated as an unresolved ID and returns null.java.net.MalformedURLException
- if the URL specification found is malformedpublic boolean isID(java.net.URL url)
public Map.ID getIDFromURL(java.net.URL url)
getIDFromURL
in interface Map
url
- The URL to get the ID for.public Map.ID getClosestID(java.net.URL url)
getClosestID
in interface Map
url
- A URL