Class FixtureConstantDefinitionMap
java.lang.Object
java.util.AbstractMap<String,Constant>
java.util.HashMap<String,Constant>
java.util.LinkedHashMap<String,Constant>
de.floydkretschmar.fixturize.stategies.constants.FixtureConstantDefinitionMap
- All Implemented Interfaces:
ConstantDefinitionMap,Serializable,Cloneable,Map<String,,Constant> SequencedMap<String,Constant>
public class FixtureConstantDefinitionMap
extends LinkedHashMap<String,Constant>
implements ConstantDefinitionMap
An extension of the
LinkedHashMap that contains all methods for storing and retrieving of Constants
where the order of elements has to be preserved.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionFixtureConstantDefinitionMap(Map<? extends String, ? extends Constant> fixtureConstantMap) Constructs aFixtureConstantDefinitionMapusing a specified map as a base. -
Method Summary
Modifier and TypeMethodDescriptiongetMatchingConstants(Collection<String> keys) Returns allConstants for the provided set of keys.Methods inherited from class java.util.LinkedHashMap
clear, containsValue, entrySet, forEach, get, getOrDefault, keySet, newLinkedHashMap, putFirst, putLast, removeEldestEntry, replaceAll, reversed, sequencedEntrySet, sequencedKeySet, sequencedValues, valuesMethods inherited from class java.util.HashMap
clone, compute, computeIfAbsent, computeIfPresent, containsKey, isEmpty, merge, newHashMap, put, putAll, putIfAbsent, remove, remove, replace, replace, sizeMethods inherited from class java.util.AbstractMap
equals, hashCode, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, valuesMethods inherited from interface java.util.SequencedMap
firstEntry, lastEntry, pollFirstEntry, pollLastEntry
-
Constructor Details
-
FixtureConstantDefinitionMap
Constructs aFixtureConstantDefinitionMapusing a specified map as a base.- Parameters:
fixtureConstantMap- - the map of customConstants
-
-
Method Details
-
getMatchingConstants
Returns allConstants for the provided set of keys.- Specified by:
getMatchingConstantsin interfaceConstantDefinitionMap- Parameters:
keys- - for which theConstants will be retrieved- Returns:
- the collection of
Constants - Throws:
FixtureCreationException- if a specified key does not have a corresponding value
-