Class DocMap

java.lang.Object
org.codelibs.fess.util.DocMap
All Implemented Interfaces:
Map<String,Object>

public class DocMap extends Object implements Map<String,Object>
A wrapper implementation of Map<String, Object> that provides special handling for document data. This class wraps an existing map and provides custom behavior for the entrySet method to ensure language fields appear first in iteration order. Used throughout the Fess search system for document data manipulation.
  • Constructor Details

    • DocMap

      public DocMap(Map<String,Object> parent)
      Constructor that creates a DocMap wrapping the given parent map.
      Parameters:
      parent - the map to wrap and delegate operations to
  • Method Details

    • size

      public int size()
      Returns the number of key-value mappings in this map.
      Specified by:
      size in interface Map<String,Object>
      Returns:
      the number of key-value mappings in this map
    • isEmpty

      public boolean isEmpty()
      Returns true if this map contains no key-value mappings.
      Specified by:
      isEmpty in interface Map<String,Object>
      Returns:
      true if this map contains no key-value mappings
    • containsKey

      public boolean containsKey(Object key)
      Returns true if this map contains a mapping for the specified key.
      Specified by:
      containsKey in interface Map<String,Object>
      Parameters:
      key - the key whose presence in this map is to be tested
      Returns:
      true if this map contains a mapping for the specified key
    • containsValue

      public boolean containsValue(Object value)
      Returns true if this map maps one or more keys to the specified value.
      Specified by:
      containsValue in interface Map<String,Object>
      Parameters:
      value - the value whose presence in this map is to be tested
      Returns:
      true if this map maps one or more keys to the specified value
    • get

      public Object get(Object key)
      Returns the value to which the specified key is mapped.
      Specified by:
      get in interface Map<String,Object>
      Parameters:
      key - the key whose associated value is to be returned
      Returns:
      the value to which the specified key is mapped, or null if no mapping exists
    • put

      public Object put(String key, Object value)
      Associates the specified value with the specified key in this map.
      Specified by:
      put in interface Map<String,Object>
      Parameters:
      key - the key with which the specified value is to be associated
      value - the value to be associated with the specified key
      Returns:
      the previous value associated with key, or null if no mapping existed
    • remove

      public Object remove(Object key)
      Removes the mapping for a key from this map if it is present.
      Specified by:
      remove in interface Map<String,Object>
      Parameters:
      key - the key whose mapping is to be removed from the map
      Returns:
      the previous value associated with key, or null if no mapping existed
    • putAll

      public void putAll(Map<? extends String,? extends Object> m)
      Copies all of the mappings from the specified map to this map.
      Specified by:
      putAll in interface Map<String,Object>
      Parameters:
      m - the mappings to be stored in this map
    • clear

      public void clear()
      Removes all of the mappings from this map.
      Specified by:
      clear in interface Map<String,Object>
    • keySet

      public Set<String> keySet()
      Returns a Set view of the keys contained in this map.
      Specified by:
      keySet in interface Map<String,Object>
      Returns:
      a set view of the keys contained in this map
    • values

      public Collection<Object> values()
      Returns a Collection view of the values contained in this map.
      Specified by:
      values in interface Map<String,Object>
      Returns:
      a collection view of the values contained in this map
    • entrySet

      public Set<Map.Entry<String,Object>> entrySet()
      Returns a Set view of the mappings contained in this map. If the map contains a language key, it will be sorted to appear first.
      Specified by:
      entrySet in interface Map<String,Object>
      Returns:
      a set view of the mappings contained in this map with language key prioritized