Class Tag
- java.lang.Object
-
- com.alachisoft.ncache.runtime.caching.Tag
-
public class Tag extends java.lang.ObjectRepresents a string based identifier that can be associated with the cache items so that they are logically grouped together and can be retrieved efficiently. One or more tags can be associated with each cache item.
-
-
Constructor Summary
Constructors Constructor Description Tag(java.lang.String tag)Initializes a new instance of tag class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)It compares the object with the tag and return true if is equal, otherwise it will return false.intgetHashCode()Gets the HashCode for the tag.java.lang.StringgetTagName()Gets the string based tag name.voidsetTagName(java.lang.String tag)Sets the string based tag name.java.lang.StringToString()Returns string representation of the tag class.
-
-
-
Method Detail
-
getTagName
public java.lang.String getTagName()
Gets the string based tag name.- Returns:
- String based tag name.
-
setTagName
public void setTagName(java.lang.String tag)
Sets the string based tag name.- Parameters:
tag- String based tag name.
-
ToString
public java.lang.String ToString()
Returns string representation of the tag class.- Returns:
- String representation of the tag class.
-
equals
public boolean equals(java.lang.Object obj)
It compares the object with the tag and return true if is equal, otherwise it will return false.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- Object passed must be of type Tag. OtherwiseIllegalArgumentExceptionwill be thrown.- Returns:
- True, if tags are same otherwise, false.
-
getHashCode
public int getHashCode()
Gets the HashCode for the tag.- Returns:
- HashCode for the tag.
-
-