Package org.codelibs.fess.util
Class DocMap
java.lang.Object
org.codelibs.fess.util.DocMap
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.
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()Removes all of the mappings from this map.booleancontainsKey(Object key) Returns true if this map contains a mapping for the specified key.booleancontainsValue(Object value) Returns true if this map maps one or more keys to the specified value.entrySet()Returns a Set view of the mappings contained in this map.Returns the value to which the specified key is mapped.booleanisEmpty()Returns true if this map contains no key-value mappings.keySet()Returns a Set view of the keys contained in this map.Associates the specified value with the specified key in this map.voidCopies all of the mappings from the specified map to this map.Removes the mapping for a key from this map if it is present.intsize()Returns the number of key-value mappings in this map.values()Returns a Collection view of the values contained in this map.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll
-
Constructor Details
-
DocMap
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. -
isEmpty
public boolean isEmpty()Returns true if this map contains no key-value mappings. -
containsKey
Returns true if this map contains a mapping for the specified key.- Specified by:
containsKeyin interfaceMap<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
Returns true if this map maps one or more keys to the specified value.- Specified by:
containsValuein interfaceMap<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
Returns the value to which the specified key is mapped. -
put
Associates the specified value with the specified key in this map. -
remove
Removes the mapping for a key from this map if it is present. -
putAll
Copies all of the mappings from the specified map to this map. -
clear
public void clear()Removes all of the mappings from this map. -
keySet
Returns a Set view of the keys contained in this map. -
values
Returns a Collection view of the values contained in this map. -
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.
-