54 |
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no) |
* @author Rolf W. Rasmussen (rolfwr@ii.uib.no) |
55 |
* @author Eric Blake (ebb9@email.byu.edu) |
* @author Eric Blake (ebb9@email.byu.edu) |
56 |
*/ |
*/ |
57 |
public class RenderingHints implements Map, Cloneable |
public class RenderingHints |
58 |
|
implements Map<Object,Object>, Cloneable |
59 |
{ |
{ |
60 |
/** |
/** |
61 |
* The base class used to represent keys. |
* The base class used to represent keys. |
551 |
* @param init a map containing a collection of hints (<code>null</code> |
* @param init a map containing a collection of hints (<code>null</code> |
552 |
* permitted). |
* permitted). |
553 |
*/ |
*/ |
554 |
public RenderingHints(Map init) |
public RenderingHints(Map<Key,?> init) |
555 |
{ |
{ |
556 |
if (init != null) |
if (init != null) |
557 |
putAll(init); |
putAll(init); |
705 |
* @throws IllegalArgumentException if the map contains a value that is |
* @throws IllegalArgumentException if the map contains a value that is |
706 |
* not compatible with its key. |
* not compatible with its key. |
707 |
*/ |
*/ |
708 |
public void putAll(Map m) |
public void putAll(Map<?,?> m) |
709 |
{ |
{ |
710 |
// preprocess map to generate appropriate exceptions |
// preprocess map to generate appropriate exceptions |
711 |
Iterator iterator = m.keySet().iterator(); |
Iterator iterator = m.keySet().iterator(); |
724 |
* |
* |
725 |
* @return A set of keys. |
* @return A set of keys. |
726 |
*/ |
*/ |
727 |
public Set keySet() |
public Set<Object> keySet() |
728 |
{ |
{ |
729 |
return hintMap.keySet(); |
return hintMap.keySet(); |
730 |
} |
} |
736 |
* |
* |
737 |
* @return A collection of values. |
* @return A collection of values. |
738 |
*/ |
*/ |
739 |
public Collection values() |
public Collection<Object> values() |
740 |
{ |
{ |
741 |
return hintMap.values(); |
return hintMap.values(); |
742 |
} |
} |
746 |
* |
* |
747 |
* @return A set of entries. |
* @return A set of entries. |
748 |
*/ |
*/ |
749 |
public Set entrySet() |
public Set<Map.Entry<Object,Object>> entrySet() |
750 |
{ |
{ |
751 |
return Collections.unmodifiableSet(hintMap.entrySet()); |
return Collections.unmodifiableSet(hintMap.entrySet()); |
752 |
} |
} |