Class NamedTagsDictionary


  • public class NamedTagsDictionary
    extends java.lang.Object
    Represents a dictionary that can be associated with the cache items to provide extra information so that items are grouped together and can be queried efficiently based on the provided information.
    • Constructor Summary

      Constructors 
      Constructor Description
      NamedTagsDictionary()
      Initializes the NameTagsDictionary object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(java.lang.String key, boolean value)
      Adds a boolean value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, char value)
      Adds a character value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, double value)
      Adds a double value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, float value)
      Adds a float value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, int value)
      Adds an integer value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, long value)
      Adds a long value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, java.lang.String value)
      Adds a string value against a key in the NamedTagsDictionary.
      void add​(java.lang.String key, java.math.BigDecimal value)
      Adds a BigDecimal value against a key in NamedTagsDictionary.
      void add​(java.lang.String key, java.util.Date value)
      Adds a Date value against a key in the NamedTagsDictionary.
      boolean contains​(java.lang.String key)
      This method searches for the key in the NamedTagsDictionary and returns true, if it is found and false, in other case.
      int getCount()
      Returns the number of items in the NamedTagsDictionary.
      java.util.Iterator getIterator()
      Returns an iterator that iterates through the entries of the NamedTagsDictionary.
      java.util.Iterator getKeysIterator()
      Returns an iterator that iterates through the keys of the NamedTagsDictionary.
      java.lang.Object getType​(java.lang.Object key)  
      java.lang.Object getValue​(java.lang.String key)
      Gets the value of the specified key in the NamedTagsDictionary.
      void remove​(java.lang.String key)
      Removes the key value pair from the NamedTagsDictionary.
      • Methods inherited from class java.lang.Object

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

      • NamedTagsDictionary

        public NamedTagsDictionary()
        Initializes the NameTagsDictionary object.
    • Method Detail

      • add

        public void add​(java.lang.String key,
                        int value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds an integer value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Integer Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        long value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a long value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Long Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        float value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a float value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Float Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        double value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a double value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Double Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        java.lang.String value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a string value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - String Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        char value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a character value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Character Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        boolean value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a boolean value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Boolean Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        java.util.Date value)
                 throws java.lang.IllegalArgumentException,
                        java.lang.IllegalArgumentException
        Adds a Date value against a key in the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - Date value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • add

        public void add​(java.lang.String key,
                        java.math.BigDecimal value)
                 throws java.lang.IllegalArgumentException
        Adds a BigDecimal value against a key in NamedTagsDictionary.
        Parameters:
        key - Key of an item.
        value - BigDecimal Value of an item.
        Throws:
        java.lang.IllegalArgumentException
        java.lang.IllegalArgumentException
      • remove

        public void remove​(java.lang.String key)
        Removes the key value pair from the NamedTagsDictionary.
        Parameters:
        key - Key of an item.
      • getCount

        public int getCount()
        Returns the number of items in the NamedTagsDictionary.
        Returns:
        The number of items in the NamedTagsDictionary.
      • getIterator

        public java.util.Iterator getIterator()
        Returns an iterator that iterates through the entries of the NamedTagsDictionary.
        Returns:
        An Iterator instance.
      • getKeysIterator

        public java.util.Iterator getKeysIterator()
        Returns an iterator that iterates through the keys of the NamedTagsDictionary.
        Returns:
        An Iterator instance.
      • contains

        public boolean contains​(java.lang.String key)
        This method searches for the key in the NamedTagsDictionary and returns true, if it is found and false, in other case.
        Parameters:
        key - The key to be searched.
        Returns:
        True, if key exists otherwise, false.
      • getValue

        public java.lang.Object getValue​(java.lang.String key)
        Gets the value of the specified key in the NamedTagsDictionary. If key is not found, returns null.
        Parameters:
        key - The key to be searched.
        Returns:
        Associated value of the key if the key exists, otherwise null.
      • getType

        public java.lang.Object getType​(java.lang.Object key)