PropertiesMap
org.clapper.util.misc

Class PropertiesMap

    • Constructor Detail

      • PropertiesMap

        public PropertiesMap(Properties properties)
        Construct a map to wrap the specified Properties object.
        Parameters:
        properties - the Properties object
    • Method Detail

      • containsKey

        public boolean containsKey(Object key)
        Determine whether this map contains a mapping for a given key. Note that this implementation of containsKey() does not refresh the object in the cache.
        Specified by:
        containsKey in interface Map<String,String>
        Overrides:
        containsKey in class AbstractMap<String,String>
        Parameters:
        key - the key to find
        Returns:
        true if the key is in the map, false if not
      • containsValue

        public boolean containsValue(Object value)
        Determine whether this map contains a given value. Note that this implementation of containsValue() does not refresh the objects in the cache.
        Specified by:
        containsValue in interface Map<String,String>
        Overrides:
        containsValue in class AbstractMap<String,String>
        Parameters:
        value - the value to find
        Returns:
        true if the value is in the map, false if not
      • entrySet

        public Set<Map.Entry<String,String>> entrySet()
        Get a set view of the mappings in this map. Each element in this set is a Map.Entry. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection supports element removal, which removes the corresponding mapping from the map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and clear operations. It does not support the add or addAll operations.
        Specified by:
        entrySet in interface Map<String,String>
        Specified by:
        entrySet in class AbstractMap<String,String>
        Returns:
        nothing
        Throws:
        UnsupportedOperationException - unconditionally
      • get

        public String get(Object key)
        Retrieve an object from the map. Retrieving an object from an LRU map "refreshes" the object so that it is among the most recently used objects.
        Specified by:
        get in interface Map<String,String>
        Overrides:
        get in class AbstractMap<String,String>
        Parameters:
        key - the object's key in the map. Must be a string.
        Returns:
        the associated object, or null if not found
        Throws:
        ClassCastException - if key is not a string
      • keySet

        public Set<String> keySet()

        Return a Set view of the keys in the map. The set is partially backed by the map. Changes to the map are not necessarily reflected in the set, and vice-versa. The set does not support element removal.

        Specified by:
        keySet in interface Map<String,String>
        Overrides:
        keySet in class AbstractMap<String,String>
        Returns:
        the set of keys in this map
      • put

        public String put(String key,         String value)
        Associates the specified value with the specified key in this map. If the key already has a value in this map, the existing value is replaced by the new value, and the old value is replaced. If the key already exists in the map, it is moved to the end of the key insertion order list.
        Specified by:
        put in interface Map<String,String>
        Overrides:
        put in class AbstractMap<String,String>
        Parameters:
        key - the key with which the specified value is to be associated
        value - the value to associate with the specified key
        Returns:
        the previous value associated with the key, or null if (a) there was no previous value, or (b) the previous value was a null
      • size

        public int size()
        Get the number of entries in the map. Note that this value can temporarily exceed the maximum capacity of the map. See the class documentation for details.
        Specified by:
        size in interface Map<String,String>
        Overrides:
        size in class AbstractMap<String,String>
        Returns:
        the number of entries in the map

SCaVis 1.8 © jWork.org