Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.pdfbox.pdmodel.common
Class COSDictionaryMap

    java.lang.Object
      org.pdfbox.pdmodel.common.COSDictionaryMap

All Implemented Interfaces:
  Map

public class COSDictionaryMap
extends Object
implements Map

This is a Map that will automatically sync the contents to a COSDictionary.

Version:
  $Revision: 1.9 $
Author:
  Ben Litchfield (ben@csh.rit.edu)

Nested Class Summary

Nested classes inherited from class java.util.Map
`Map.Entry`

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()` This will get a string representation of this map.
`Collection` | `values()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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 Detail

### size

    public int size()

  Specified by:
    `size` in interface `Map`
  See Also:
    `Map.size()`

### isEmpty

    public boolean isEmpty()

  Specified by:
    `isEmpty` in interface `Map`
  See Also:
    `Map.isEmpty()`

### containsKey

    public boolean containsKey(Object key)

  Specified by:
    `containsKey` in interface `Map`
  See Also:
    `java.util.Map#containsKey()`

### containsValue

    public boolean containsValue(Object value)

  Specified by:
    `containsValue` in interface `Map`
  See Also:
    `java.util.Map#containsValue()`

### get

    public Object get(Object key)

  Specified by:
    `get` in interface `Map`
  See Also:
    `java.util.Map#get()`

### put

    public Object put(Object key,
                      Object value)

  Specified by:
    `put` in interface `Map`
  See Also:
    `java.util.Map#put()`

### remove

    public Object remove(Object key)

  Specified by:
    `remove` in interface `Map`
  See Also:
    `java.util.Map#remove()`

### putAll

    public void putAll(Map t)

  Specified by:
    `putAll` in interface `Map`
  See Also:
    `java.util.Map#putAll()`

### clear

    public void clear()

  Specified by:
    `clear` in interface `Map`
  See Also:
    `Map.clear()`

### keySet

    public Set keySet()

  Specified by:
    `keySet` in interface `Map`
  See Also:
    `Map.keySet()`

### values

    public Collection values()

  Specified by:
    `values` in interface `Map`
  See Also:
    `Map.values()`

### entrySet

    public Set entrySet()

  Specified by:
    `entrySet` in interface `Map`
  See Also:
    `Map.entrySet()`

### equals

    public boolean equals(Object o)

  Specified by:
    `equals` in interface `Map`
  See Also:
    `java.util.Map#equals()`

### toString

    public String toString()

  This will get a string representation of this map.

  Returns:
    A human readable form of this map.

### hashCode

    public int hashCode()

  Specified by:
    `hashCode` in interface `Map`
  See Also:
    `Map.hashCode()`

### 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.
  Throws:
    `IOException` - If there is an error during the conversion.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD