org.apache.batik.transcoder
Class TranscodingHints

java.lang.Object
  |
  +--org.apache.batik.transcoder.TranscodingHints
All Implemented Interfaces:
java.lang.Cloneable, java.util.Map

public class TranscodingHints
extends java.lang.Object
implements java.util.Map, java.lang.Cloneable

The TranscodingHints class contains transcoding hints that can be used by Transcoder class.


Inner Class Summary
static class TranscodingHints.Key
          Defines the base type of all keys used to control various aspects of the trancoding operations.
 
Inner classes inherited from class java.util.Map
java.util.Map.Entry
 
Field Summary
static TranscodingHints.Key KEY_BACKGROUND
          Background color key.
static TranscodingHints.Key KEY_DEFAULT_VIEWPORT
          The default viewport.
static TranscodingHints.Key KEY_GVT_BUILDER
          The GVTBuilder implementation to use.
static TranscodingHints.Key KEY_XML_PARSER_CLASSNAME
          The XML parser classname key.
 
Constructor Summary
TranscodingHints()
          Constructs a new empty object.
TranscodingHints(java.util.Map init)
          Constructs a new object with keys and values initialized from the specified Map object (which may be null).
TranscodingHints(TranscodingHints.Key key, java.lang.Object value)
          Constructs a new object with the specified key/value pair.
 
Method Summary
 void add(TranscodingHints hints)
          Adds all of the keys and corresponding values from the specified TranscodingHints object to this TranscodingHints object.
 void clear()
          Clears this TranscodingHints object of all key/value pairs.
 java.lang.Object clone()
          Creates a clone of this TranscodingHints object that has the same contents as this TranscodingHints object.
 boolean containsKey(java.lang.Object key)
          Returns true if this TranscodingHints contains a mapping for the specified key, false otherwise.
 boolean containsValue(java.lang.Object value)
          Returns true if this TranscodingHints maps one or more keys to the specified value.
 java.util.Set entrySet()
          Returns a Set view of the mappings contained in this TranscodingHints.
 boolean equals(java.lang.Object o)
          Compares the specified Object with this TranscodingHints for equality.
 java.lang.Object get(java.lang.Object key)
          Returns the value to which the specified key is mapped.
 int hashCode()
          Returns the hash code value for this TranscodingHints.
 boolean isEmpty()
          Returns true if this TranscodingHints contains no key-value mappings, false otherwise.
 java.util.Set keySet()
          Returns a Set view of the Keys contained in this TranscodingHints.
 java.lang.Object put(java.lang.Object key, java.lang.Object value)
          Maps the specified key to the specified value in this TranscodingHints object.
 void putAll(java.util.Map m)
          Copies all of the mappings from the specified Map to this TranscodingHints.
 java.lang.Object remove(java.lang.Object key)
          Removes the key and its corresponding value from this TranscodingHints object.
 int size()
          Returns the number of key-value mappings in this TranscodingHints.
 java.util.Collection values()
          Returns a Collection view of the values contained in this TranscodingHints.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEY_BACKGROUND

public static final TranscodingHints.Key KEY_BACKGROUND
Background color key.

KEY_XML_PARSER_CLASSNAME

public static final TranscodingHints.Key KEY_XML_PARSER_CLASSNAME
The XML parser classname key.

KEY_DEFAULT_VIEWPORT

public static final TranscodingHints.Key KEY_DEFAULT_VIEWPORT
The default viewport.

KEY_GVT_BUILDER

public static final TranscodingHints.Key KEY_GVT_BUILDER
The GVTBuilder implementation to use.
Constructor Detail

TranscodingHints

public TranscodingHints()
Constructs a new empty object.

TranscodingHints

public TranscodingHints(java.util.Map init)
Constructs a new object 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

TranscodingHints

public TranscodingHints(TranscodingHints.Key key,
                        java.lang.Object value)
Constructs a new object with the specified key/value pair.
Parameters:
key - the key of the particular hint property
value - the value of the hint property specified with key
Method Detail

size

public int size()
Returns the number of key-value mappings in this TranscodingHints.
Specified by:
size in interface java.util.Map

isEmpty

public boolean isEmpty()
Returns true if this TranscodingHints contains no key-value mappings, false otherwise.
Specified by:
isEmpty in interface java.util.Map

containsKey

public boolean containsKey(java.lang.Object key)
Returns true if this TranscodingHints contains a mapping for the specified key, false otherwise.
Specified by:
containsKey in interface java.util.Map
Parameters:
key - key whose present in this TranscodingHints is to be tested.

containsValue

public boolean containsValue(java.lang.Object value)
Returns true if this TranscodingHints maps one or more keys to the specified value.
Specified by:
containsValue in interface java.util.Map
Parameters:
value - value whose presence in this TranscodingHints is to be tested.

get

public java.lang.Object get(java.lang.Object key)
Returns the value to which the specified key is mapped.
Specified by:
get in interface java.util.Map
Parameters:
key - a trancoding hint key
Throws:
java.lang.ClassCastException - key is not of type TranscodingHints.Key

put

public java.lang.Object put(java.lang.Object key,
                            java.lang.Object value)
Maps the specified key to the specified value in this TranscodingHints object.
Specified by:
put in interface java.util.Map
Parameters:
key - the trancoding hint key.
value - the trancoding hint value.
Throws:
IllegalArgumentException - value is not appropriate for the specified key.
java.lang.ClassCastException - key is not of type TranscodingHints.Key

add

public void add(TranscodingHints hints)
Adds all of the keys and corresponding values from the specified TranscodingHints object to this TranscodingHints object.

clear

public void clear()
Clears this TranscodingHints object of all key/value pairs.
Specified by:
clear in interface java.util.Map

remove

public java.lang.Object remove(java.lang.Object key)
Removes the key and its corresponding value from this TranscodingHints object.
Specified by:
remove in interface java.util.Map
Parameters:
key - the trancoding hints key that needs to be removed
Throws:
java.lang.ClassCastException - key is not of type TranscodingHints.Key

putAll

public void putAll(java.util.Map m)
Copies all of the mappings from the specified Map to this TranscodingHints.
Specified by:
putAll in interface java.util.Map
Parameters:
t - mappings to be stored in this TranscodingHints.
Throws:
java.lang.ClassCastException - key is not of type TranscodingHints.Key

keySet

public java.util.Set keySet()
Returns a Set view of the Keys contained in this TranscodingHints.
Specified by:
keySet in interface java.util.Map

values

public java.util.Collection values()
Returns a Collection view of the values contained in this TranscodingHints.
Specified by:
values in interface java.util.Map

entrySet

public java.util.Set entrySet()
Returns a Set view of the mappings contained in this TranscodingHints.
Specified by:
entrySet in interface java.util.Map

equals

public boolean equals(java.lang.Object o)
Compares the specified Object with this TranscodingHints for equality.
Specified by:
equals in interface java.util.Map
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Returns the hash code value for this TranscodingHints.
Specified by:
hashCode in interface java.util.Map
Overrides:
hashCode in class java.lang.Object

clone

public java.lang.Object clone()
Creates a clone of this TranscodingHints object that has the same contents as this TranscodingHints object.
Overrides:
clone in class java.lang.Object


Copyright © 2000 Apache Software Foundation. All Rights Reserved.