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 with an attributes Set. Keeping the
attributes Set outside of the Link, enables
modifiable places to more easily change the attributes Set data
for a particular Link.
- See Also:
- Serialized Form
|
Constructor Summary |
LinkItem(Link link,
java.util.Set attributes)
Constructs a LinkItem with passed Link and
attributes Set. |
|
Method Summary |
boolean |
equals(java.lang.Object o)
Compares the specified Object with this
LinkItem for equality. |
java.util.Set |
getAttributes()
Returns the attributes Set 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,
java.util.Set attributes)
- Constructs a
LinkItem with passed Link and
attributes Set.
- Parameters:
link - The Link to hold in this
LinkItemattributes - The attributes Set to hold in this
LinkItem- Throws:
NullPointerException - if either of the link or
attributes 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
getAttributes
public java.util.Set getAttributes()
- Returns the attributes
Set object that's stored in this
LinkItem. The attributes Set provides
information, suitable for display to users, about the linked-to
service. The attributes Set can also be used by search
engine spiders (or their equivalent) in collecting information
about this service for indexing in their databases.
- Returns:
- the attributes
Set 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 attributes Sets 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 attributes Set.
- Overrides:
hashCode in class java.lang.Object
- Returns:
- the hash code for this object