Class Tag
- All Implemented Interfaces:
Serializable
Tag Class.
- Author:
- Ken Paulsen (ken.paulsen@sun.com)
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAllows an additional user to be added as a Tag creator.booleancontainsUser(String name) Checks to see if the given user is an owner of this Tag.booleanThis implementation of equals only checks the tagName and the tagViewId for equality.This returns aStringthat is meaningful to the user which represents the content of thisTaginstance.This provides access to the tag name.This provides access to the TagViewId value.getUsers()Provides access to all the users that have created this Tag.inthashCode()removeUser(String name) This method ensures the specifieduseris removed from the list of users for thisTag.toString()String representation of this Tag.
-
Constructor Details
-
Tag
The constructor that should normally be used.
-
-
Method Details
-
addUser
Allows an additional user to be added as a Tag creator.
-
getUsers
Provides access to all the users that have created this Tag. This may be null.
-
containsUser
Checks to see if the given user is an owner of this Tag.
-
removeUser
This method ensures the specified
useris removed from the list of users for thisTag.While a
Tagis of little or no use when 0 users own theTag, it is not the responsibility of this method to remove theTagif this state occurs as a result of a call to this method.- Returns:
- The
Listof users remaining after removing this user, ornullif none.
-
equals
This implementation of equals only checks the tagName and the tagViewId for equality. This means 2 tags with different user Lists are still considered equal. The Display Name is also of no importance to this implementation of equality.
-
hashCode
public int hashCode() -
toString
String representation of this Tag.
-
getTagName
This provides access to the tag name.
-
getTagViewId
This provides access to the TagViewId value.
-
getDisplayName
This returns a
Stringthat is meaningful to the user which represents the content of thisTaginstance.
-