com.artima.place
Class LinkItem
java.lang.Object
|
+--com.artima.place.LinkItem
- All Implemented Interfaces:
- java.io.Serializable
- public class LinkItem
- extends java.lang.Object
- implements java.io.Serializable
Associates a Link to an InfoBundle. Keeping the
InfoBundle outside of the Link, enables
modifiable places to more easily change the InfoBundle data
for a particular Link.
- See Also:
- Serialized Form
|
Constructor Summary |
LinkItem(Link link,
InfoBundle infoBundle)
Constructs a LinkItem with passed Link and
InfoBundle. |
|
Method Summary |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this
LinkItem for equality. |
InfoBundle |
getInfoBundle()
Returns the InfoBundle object that's stored in this
LinkItem. |
Link |
getLink()
Returns the Link object that's stored in this
LinkItem. |
int |
hashCode()
Returns the hash code value for this LinkItem. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
LinkItem
public LinkItem(Link link,
InfoBundle infoBundle)
- Constructs a
LinkItem with passed Link and
InfoBundle.
- Parameters:
link - The Link to hold in this
LinkIteminfoBundle - The InfoBundle to hold in this
LinkItem- Throws:
NullPointerException - if either of the Link or
InfoBundle references passed to this constructor are
null
getLink
public Link getLink()
- Returns the
Link object that's stored in this
LinkItem.
- Returns:
- the
Link held in this LinkItem
getInfoBundle
public InfoBundle getInfoBundle()
- Returns the
InfoBundle object that's stored in this
LinkItem. The InfoBundle provides
information, suitable for display to users, about the linked-to
service.
- Returns:
- the
InfoBundle held in this
LinkItem
equals
public boolean equals(java.lang.Object o)
- Compares the specified
Object with this
LinkItem for equality. Two LinkItems are
semantically equal if their Links are semantically equal
and their InfoBundles are semantically equal. If the
passed object reference is null, this method returns
false.
- Overrides:
equals in class java.lang.Object
- Returns:
true if this object is semantically equal to the
passed object
hashCode
public int hashCode()
- Returns the hash code value for this
LinkItem. The
hashcode for a LinkItem is the exclusive OR of the
hashcodes for the LinkItem's constituent
Link and InfoBundle.
- Overrides:
hashCode in class java.lang.Object
- Returns:
- the hash code for this object