Class Tag


  • public class Tag
    extends java.lang.Object
    Represents 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
      boolean equals​(java.lang.Object obj)
      It compares the object with the tag and return true if is equal, otherwise it will return false.
      int getHashCode()
      Gets the HashCode for the tag.
      java.lang.String getTagName()
      Gets the string based tag name.
      void setTagName​(java.lang.String tag)
      Sets the string based tag name.
      java.lang.String ToString()
      Returns string representation of the tag class.
      • Methods inherited from class java.lang.Object

        getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Tag

        public Tag​(java.lang.String tag)
        Initializes a new instance of tag class.
        Parameters:
        tag - Name of the tag.
    • 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:
        equals in class java.lang.Object
        Parameters:
        obj - Object passed must be of type Tag. Otherwise IllegalArgumentException will 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.