org.pdfbox.pdmodel.common

Class COSDictionaryMap

Implemented Interfaces:
Map

public class COSDictionaryMap
extends java.lang.Object
implements Map

This is a Map that will automatically sync the contents to a COSDictionary.
Version:
$Revision: 1.10 $
Author:
Ben Litchfield

Constructor Summary

COSDictionaryMap(Map actualsMap, COSDictionary dicMap)
Constructor for this map.

Method Summary

void
clear()
boolean
containsKey(Object key)
boolean
containsValue(Object value)
static COSDictionary
convert(Map someMap)
This will take a map<java.lang.String,org.pdfbox.pdmodel.COSObjectable> and convert it into a COSDictionary<COSName,COSBase>.
static COSDictionaryMap
convertBasicTypesToMap(COSDictionary map)
This will take a COS dictionary and convert it into COSDictionaryMap.
Set
entrySet()
boolean
equals(Object o)
Object
get(Object key)
int
hashCode()
boolean
isEmpty()
Set
keySet()
Object
put(Object key, Object value)
void
putAll(Map t)
Object
remove(Object key)
int
size()
String
toString()
Collection
values()

Constructor Details

COSDictionaryMap

public COSDictionaryMap(Map actualsMap,
                        COSDictionary dicMap)
Constructor for this map.
Parameters:
actualsMap - The map with standard java objects as values.
dicMap - The map with COSBase objects as values.

Method Details

clear

public void clear()

containsKey

public boolean containsKey(Object key)

containsValue

public boolean containsValue(Object value)

convert

public static COSDictionary convert(Map someMap)
This will take a map<java.lang.String,org.pdfbox.pdmodel.COSObjectable> and convert it into a COSDictionary<COSName,COSBase>.
Parameters:
someMap - A map containing COSObjectables
Returns:
A proper COSDictionary

convertBasicTypesToMap

public static COSDictionaryMap convertBasicTypesToMap(COSDictionary map)
            throws IOException
This will take a COS dictionary and convert it into COSDictionaryMap. All cos objects will be converted to their primitive form.
Parameters:
map - The COS mappings.
Returns:
A standard java map.

entrySet

public Set entrySet()

equals

public boolean equals(Object o)

get

public Object get(Object key)

hashCode

public int hashCode()

isEmpty

public boolean isEmpty()

keySet

public Set keySet()

put

public Object put(Object key,
                  Object value)

putAll

public void putAll(Map t)

remove

public Object remove(Object key)

size

public int size()

toString

public String toString()

values

public Collection values()