javax.help

Class Map.ID

Enclosing Class:
Map
Implemented Interfaces:
Serializable

public final class Map.ID
extends java.lang.Object
implements Serializable

An ID is a pair of String, HelpSet. An ID fully identifies a "location" within a HelpSet.

Field Summary

HelpSet
hs
String
id

Method Summary

static Map.ID
create(String id, HelpSet hs)
A location within a HelpSet.
boolean
equals(Object o)
Determines if two IDs are equal.
HelpSet
getHelpSet()
Getter for property hs.
String
getIDString()
Getter for property id.
URL
getURL()
Returns the URL that the Map.ID refers to.
String
toString()
Gets an external represenation of an ID.

Field Details

hs

public HelpSet hs

id

public String id

Method Details

create

public static Map.ID create(String id,
                            HelpSet hs)
            throws BadIDException
A location within a HelpSet. If id or hs are null, a null ID is returned.
Parameters:
id - The String
hs - The HelpSet
Throws:
BadIDException - if String is not within the Map of the HelpSet.

equals

public boolean equals(Object o)
Determines if two IDs are equal.
Parameters:
o - The object to compare.

getHelpSet

public HelpSet getHelpSet()
Getter for property hs.
Returns:
Value of property hs.

getIDString

public String getIDString()
Getter for property id.
Returns:
Value of property id.

getURL

public URL getURL()
            throws MalformedURLException
Returns the URL that the Map.ID refers to.
Returns:
URL The matching URL. Null if the map cannot solve the ID.
See Also:
javax.help.Map.getURLFromID(javax.help.Map.ID id)

toString

public String toString()
Gets an external represenation of an ID.