Package org.apache.batik.transcoder
Class TranscodingHints
java.lang.Object
java.util.AbstractMap
java.util.HashMap
org.apache.batik.transcoder.TranscodingHints
- All Implemented Interfaces:
Serializable
,Cloneable
,Map
The
TranscodingHints
class defines a way to pass
transcoding parameters or options to any transcoders.- Version:
- $Id: TranscodingHints.java 1805150 2017-08-16 08:29:12Z ssteiner $
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Defines the base type of all keys used to control various aspects of the transcoding operations.Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,
V>, AbstractMap.SimpleImmutableEntry<K, V> -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a new emptyTranscodingHints
.TranscodingHints
(Map init) Constructs a newTranscodingHints
with keys and values initialized from the specified Map object (which may be null). -
Method Summary
Modifier and TypeMethodDescriptionboolean
containsKey
(Object key) Returnstrue
if thisTranscodingHints
contains a mapping for the specified key, false otherwise.Returns the value to which the specified key is mapped.Maps the specifiedkey
to the specifiedvalue
in thisTranscodingHints
object.void
Copies all of the mappings from the specifiedMap
to thisTranscodingHints
.void
putAll
(TranscodingHints hints) Copies all of the keys and corresponding values from the specifiedTranscodingHints
object to thisTranscodingHints
object.Removes the key and its corresponding value from thisTranscodingHints
object.Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsValue, entrySet, forEach, getOrDefault, isEmpty, keySet, merge, newHashMap, putIfAbsent, remove, replace, replace, replaceAll, size, values
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
-
Constructor Details
-
TranscodingHints
public TranscodingHints()Constructs a new emptyTranscodingHints
. -
TranscodingHints
Constructs a newTranscodingHints
with keys and values initialized from the specified Map object (which may be null).- Parameters:
init
- a map of key/value pairs to initialize the hints or null if the object should be empty
-
-
Method Details
-
containsKey
Returnstrue
if thisTranscodingHints
contains a mapping for the specified key, false otherwise.- Specified by:
containsKey
in interfaceMap
- Overrides:
containsKey
in classHashMap
- Parameters:
key
- key whose present in thisTranscodingHints
is to be tested.- Throws:
ClassCastException
- key is not of typeTranscodingHints.Key
-
get
Returns the value to which the specified key is mapped.- Specified by:
get
in interfaceMap
- Overrides:
get
in classHashMap
- Parameters:
key
- a trancoding hint key- Throws:
ClassCastException
- key is not of typeTranscodingHints.Key
-
put
Maps the specifiedkey
to the specifiedvalue
in thisTranscodingHints
object.- Specified by:
put
in interfaceMap
- Overrides:
put
in classHashMap
- Parameters:
key
- the trancoding hint key.value
- the trancoding hint value.- Throws:
IllegalArgumentException
- value is not appropriate for the specified key.ClassCastException
- key is not of typeTranscodingHints.Key
-
remove
Removes the key and its corresponding value from thisTranscodingHints
object.- Specified by:
remove
in interfaceMap
- Overrides:
remove
in classHashMap
- Parameters:
key
- the trancoding hints key that needs to be removed- Throws:
ClassCastException
- key is not of typeTranscodingHints.Key
-
putAll
Copies all of the keys and corresponding values from the specifiedTranscodingHints
object to thisTranscodingHints
object. -
putAll
Copies all of the mappings from the specifiedMap
to thisTranscodingHints
.- Specified by:
putAll
in interfaceMap
- Overrides:
putAll
in classHashMap
- Parameters:
m
- mappings to be stored in thisTranscodingHints
.- Throws:
ClassCastException
- key is not of typeTranscodingHints.Key
-