# org.pdfclown.objects.PdfDictionary Class Reference

PDF dictionary object [PDF:1.6:3.2.6]. More...

Inheritance diagram for org.pdfclown.objects.PdfDictionary:

List of all members.

## Public Member Functions
override PdfObject | Accept (IVisitor visitor, object data)
| Accepts a visit.
void | Add (PdfName key, PdfDirectObject value)
void | Clear ()
virtual PdfObject | Clone (File context)
| Creates a deep copy of this object within the specified file context.
object | Clone ()
| Creates a shallow copy of this object.
override int | CompareTo (PdfDirectObject obj)
bool | ContainsKey (PdfName key)
void | CopyTo (KeyValuePair< PdfName, PdfDirectObject >[] entries, int index)
override bool | Equals (object @object)
PdfDirectObject | Get< T > (PdfName key, bool direct)
| Gets the value corresponding to the given key, forcing its instantiation in case of missing entry.
PdfDirectObject | Get< T > (PdfName key)
| Gets the value corresponding to the given key, forcing its instantiation as a direct object in case of missing entry.
override int | GetHashCode ()
PdfName | GetKey (PdfDirectObject value)
| PdfDictionary (IDictionary< PdfName, PdfDirectObject > entries)
| PdfDictionary (PdfName[] keys, PdfDirectObject[] values)
| PdfDictionary (int capacity)
| PdfDictionary ()
bool | Remove (KeyValuePair< PdfName, PdfDirectObject > entry)
bool | Remove (PdfName key)
PdfDataObject | Resolve ()
| Ensures this object to be resolved into its corresponding data object.
PdfDataObject | Resolve (PdfName key)
| Gets the dereferenced value corresponding to the given key.
T | Resolve< T > (PdfName key)
| Gets the dereferenced value corresponding to the given key, forcing its instantiation in case of missing entry.
override PdfObject | Swap (PdfObject other)
| Swaps contents between this object and the other one.
override string | ToString ()
bool | TryGetValue (PdfName key, out PdfDirectObject value)
PdfDirectObject | Unresolve ()
| Ensures this object to be unresolved into its corresponding indirect reference, if available.
override void | WriteTo (IOutputStream stream, File context)
| Serializes this object to the specified stream.
## Static Public Member Functions
static PdfObject | Clone (PdfObject @object, File context)
| Gets the clone of the specified object, registered inside the specified file context.
static PdfDataObject | Resolve (PdfObject @object)
| Ensures an indirect reference to be resolved into its corresponding data object.
static PdfDirectObject | Unresolve (PdfDataObject @object)
| Ensures a data object to be unresolved into its corresponding indirect reference, if available.
## Protected Member Functions
internal void | Update ()
| Updates the state of this object.
## Properties
virtual PdfIndirectObject | Container`[get]`
| Gets the indirect object containing this object.
int | Count`[get]`
PdfIndirectObject | DataContainer`[get]`
| Gets the indirect object containing the data associated to this object.
virtual File | File`[get]`
| Gets the file containing this object.
virtual PdfIndirectObject | IndirectObject`[get]`
| Gets the indirect object corresponding to this object.
bool | IsReadOnly`[get]`
ICollection< PdfName > | Keys`[get]`
override PdfObject | Parent`[get, set]`
| Gets/Sets the parent of this object.
virtual PdfReference | Reference`[get]`
| Gets the indirect reference of this object.
PdfDirectObject | this [PdfName key]`[get, set]`
override bool | Updateable`[get, set]`
| Gets/Sets whether the detection of object state changes is enabled.
override bool | Updated`[get, set]`
| Gets/Sets whether the initial state of this object has been modified.
ICollection< PdfDirectObject > | Values`[get]`
internal override bool | Virtual`[get, set]`
| Gets/Sets whether this object acts like a null-object placeholder.

##

PDF dictionary object [PDF:1.6:3.2.6].

## Constructor & Destructor Documentation

org.pdfclown.objects.PdfDictionary.PdfDictionary | ( |  | ) |

org.pdfclown.objects.PdfDictionary.PdfDictionary | ( | int | capacity | ) |

org.pdfclown.objects.PdfDictionary.PdfDictionary | ( | PdfName[] | keys,
|  | PdfDirectObject[] | values |
| ) |  |  |

org.pdfclown.objects.PdfDictionary.PdfDictionary | ( | IDictionary< PdfName, PdfDirectObject > | entries | ) |

## Member Function Documentation

override PdfObject org.pdfclown.objects.PdfDictionary.Accept | ( | IVisitor | visitor,
|  | object | data |
| ) |  |  | `[virtual]`

Accepts a visit.

Parameters:

  | visitor | Visiting object.
  | data | Supplemental data.

Returns:
  Result object.

Implements org.pdfclown.objects.PdfObject.

References org.pdfclown.objects.IVisitor.Visit().

Referenced by org.pdfclown.tools.Optimizer.RemoveOrphanedObjects().

void org.pdfclown.objects.PdfDictionary.Add | ( | PdfName | key,
|  | PdfDirectObject | value |
| ) |  |  |

void org.pdfclown.objects.PdfDictionary.Clear | ( |  | ) |

virtual PdfObject org.pdfclown.objects.PdfObject.Clone | ( | File | context | ) | `[virtual, inherited]`

Creates a deep copy of this object within the specified file context.

Reimplemented in org.pdfclown.objects.PdfSimpleObject< TValue >.

References org.pdfclown.files.File.Cloner.

object org.pdfclown.objects.PdfObject.Clone | ( |  | ) | `[inherited]`

Creates a shallow copy of this object.

References org.pdfclown.objects.PdfObject.Parent.

static PdfObject org.pdfclown.objects.PdfObject.Clone | ( | PdfObject @ | object,
|  | File | context |
| ) |  |  | `[static, inherited]`

Gets the clone of the specified object, registered inside the specified file context.

Parameters:

  | object | Object to clone into the specified file context.
  | context | File context of the cloning.

Referenced by org.pdfclown.objects.PdfObjectWrapper< PdfTextString >.Clone(), and org.pdfclown.objects.Cloner.Visit().

override int org.pdfclown.objects.PdfDictionary.CompareTo | ( | PdfDirectObject | obj | ) | `[virtual]`

Implements org.pdfclown.objects.PdfDirectObject.

bool org.pdfclown.objects.PdfDictionary.ContainsKey | ( | PdfName | key | ) |

Referenced by org.pdfclown.documents.contents.fonts.Type1Font.GetNativeEncoding(), org.pdfclown.documents.contents.fonts.TrueTypeFont.LoadEncoding(), org.pdfclown.documents.multimedia.MediaOffset.Wrap(), org.pdfclown.documents.contents.fonts.Font.Wrap(), and org.pdfclown.documents.interaction.actions.Action.Wrap().

void org.pdfclown.objects.PdfDictionary.CopyTo | ( | KeyValuePair< PdfName, PdfDirectObject >[] | entries,
|  | int | index |
| ) |  |  |

override bool org.pdfclown.objects.PdfDictionary.Equals | ( | object @ | object | ) |

Referenced by org.pdfclown.documents.interaction.navigation.page.ArticleElement.IsHead(), org.pdfclown.documents.multimedia.MediaOffset.Wrap(), and org.pdfclown.documents.interaction.actions.Action.Wrap().

PdfDirectObject org.pdfclown.objects.PdfDictionary.Get< T > | ( | PdfName | key,
|  | bool | direct |
| ) |  |  |

Gets the value corresponding to the given key, forcing its instantiation in case of missing entry.

Parameters:

  | key | Key whose associated value is to be returned.
  | direct | Whether the item has to be instantiated directly within its container instead of being referenced through an indirect object.

Type Constraints

  T | : | PdfDataObject |
  T | : | new() |

PdfDirectObject org.pdfclown.objects.PdfDictionary.Get< T > | ( | PdfName | key | ) |

Gets the value corresponding to the given key, forcing its instantiation as a direct object in case of missing entry.

Parameters:

  | key | Key whose associated value is to be returned.

Type Constraints

  T | : | PdfDataObject |
  T | : | new() |

override int org.pdfclown.objects.PdfDictionary.GetHashCode | ( |  | ) |

PdfName org.pdfclown.objects.PdfDictionary.GetKey | ( | PdfDirectObject | value | ) |

Gets the key associated to the specified value.

bool org.pdfclown.objects.PdfDictionary.Remove | ( | KeyValuePair< PdfName, PdfDirectObject > | entry | ) |

bool org.pdfclown.objects.PdfDictionary.Remove | ( | PdfName | key | ) |

PdfDataObject org.pdfclown.objects.PdfObject.Resolve | ( |  | ) | `[inherited]`

Ensures this object to be resolved into its corresponding data object.

See also:
  Unresolve()

References org.pdfclown.objects.PdfReference.DataObject.

static PdfDataObject org.pdfclown.objects.PdfObject.Resolve | ( | PdfObject @ | object | ) | `[static, inherited]`

Ensures an indirect reference to be resolved into its corresponding data object.

Parameters:

  | object | Object to resolve.

Referenced by org.pdfclown.objects.Tree< TKey, TValue >.Remove(), org.pdfclown.documents.Pages.Remove(), org.pdfclown.documents.Page.ToXObject(), org.pdfclown.documents.contents.xObjects.XObject.Wrap(), org.pdfclown.documents.multimedia.Rendition.Wrap(), org.pdfclown.documents.contents.PropertyList.Wrap(), org.pdfclown.documents.contents.colorSpaces.Pattern.Wrap(), org.pdfclown.documents.multimedia.MediaOffset.Wrap(), org.pdfclown.documents.multimedia.MediaClip.Wrap(), org.pdfclown.documents.interchange.access.LanguageIdentifier.Wrap(), org.pdfclown.documents.contents.layers.LayerNode.Wrap(), org.pdfclown.documents.functions.Function.Wrap(), org.pdfclown.documents.files.FileSpecification.Wrap(), org.pdfclown.documents.interaction.navigation.document.Destination.Wrap(), org.pdfclown.documents.contents.colorSpaces.ColorSpace.Wrap(), org.pdfclown.documents.interaction.annotations.Annotation.Wrap(), and org.pdfclown.documents.interaction.actions.Action.Wrap().

PdfDataObject org.pdfclown.objects.PdfDictionary.Resolve | ( | PdfName | key | ) |

Gets the dereferenced value corresponding to the given key.

This method takes care to resolve the value returned by this[PdfName].

Parameters:

  | key | Key whose associated value is to be returned.

Returns:
  null, if the map contains no mapping for this key.

References org.pdfclown.objects.PdfDictionary.Resolve().

Referenced by org.pdfclown.documents.Page.GetInheritableAttribute(), org.pdfclown.documents.contents.fonts.Type1Font.GetNativeEncoding(), org.pdfclown.documents.contents.fonts.TrueTypeFont.LoadEncoding(), org.pdfclown.documents.contents.fonts.SimpleFont.LoadEncodingDifferences(), org.pdfclown.tokens.FileParser.ParsePdfObject(), org.pdfclown.documents.Pages.Remove(), org.pdfclown.objects.PdfDictionary.Resolve(), and org.pdfclown.documents.contents.fonts.Font.Wrap().

T org.pdfclown.objects.PdfDictionary.Resolve< T > | ( | PdfName | key | ) |

Gets the dereferenced value corresponding to the given key, forcing its instantiation in case of missing entry.

This method takes care to resolve the value returned by Get(PdfName).

Parameters:

  | key | Key whose associated value is to be returned.

Returns:
  null, if the map contains no mapping for this key.

Type Constraints

  T | : | PdfDataObject |
  T | : | new() |

override PdfObject org.pdfclown.objects.PdfDictionary.Swap | ( | PdfObject | other | ) | `[virtual]`

Swaps contents between this object and the other one.

Parameters:

  | other | Object whose contents have to be swapped with this one's.

Returns:
  This object.

Implements org.pdfclown.objects.PdfObject.

References org.pdfclown.objects.PdfObject.Update().

override string org.pdfclown.objects.PdfDictionary.ToString | ( |  | ) |

bool org.pdfclown.objects.PdfDictionary.TryGetValue | ( | PdfName | key,
|  | out PdfDirectObject | value |
| ) |  |  |

PdfDirectObject org.pdfclown.objects.PdfObject.Unresolve | ( |  | ) | `[inherited]`

Ensures this object to be unresolved into its corresponding indirect reference, if available.

Returns:
  PdfReference, if available;

      this

  , otherwise.

See also:
  Resolve()

static PdfDirectObject org.pdfclown.objects.PdfObject.Unresolve | ( | PdfDataObject @ | object | ) | `[static, inherited]`

Ensures a data object to be unresolved into its corresponding indirect reference, if available.

Parameters:

  | object | Object to unresolve.

Returns:
  PdfReference, if available;

      object

  , otherwise.

internal void org.pdfclown.objects.PdfObject.Update | ( |  | ) | `[protected, inherited]`

Updates the state of this object.

Referenced by org.pdfclown.objects.PdfStream.Swap(), org.pdfclown.objects.PdfDictionary.Swap(), and org.pdfclown.objects.PdfArray.Swap().

override void org.pdfclown.objects.PdfDictionary.WriteTo | ( | IOutputStream | stream,
|  | File | context |
| ) |  |  | `[virtual]`

Serializes this object to the specified stream.

Parameters:

  | stream | Target stream.
  | context | File context.

Implements org.pdfclown.objects.PdfObject.

References org.pdfclown.objects.PdfObject.Virtual, and org.pdfclown.bytes.IOutputStream.Write().

## Property Documentation

virtual PdfIndirectObject org.pdfclown.objects.PdfObject.Container`[get, inherited]`

Gets the indirect object containing this object.

See also:
  DataContainer, IndirectObject

Reimplemented in org.pdfclown.objects.PdfIndirectObject.

Referenced by org.pdfclown.tokens.CompressedWriter.WriteIncremental().

int org.pdfclown.objects.PdfDictionary.Count`[get]`

PdfIndirectObject org.pdfclown.objects.PdfObject.DataContainer`[get, inherited]`

Gets the indirect object containing the data associated to this object.

See also:
  Container, IndirectObject

virtual File org.pdfclown.objects.PdfObject.File`[get, inherited]`

Gets the file containing this object.

Reimplemented in org.pdfclown.objects.PdfIndirectObject.

Referenced by org.pdfclown.objects.Cloner.Visit().

virtual PdfIndirectObject org.pdfclown.objects.PdfObject.IndirectObject`[get, inherited]`

Gets the indirect object corresponding to this object.

See also:
  Container, DataContainer

Reimplemented in org.pdfclown.objects.PdfIndirectObject, and org.pdfclown.objects.PdfReference.

bool org.pdfclown.objects.PdfDictionary.IsReadOnly`[get]`

ICollection<PdfName> org.pdfclown.objects.PdfDictionary.Keys`[get]`

override PdfObject org.pdfclown.objects.PdfDictionary.Parent`[get, set]`

Gets/Sets the parent of this object.

See also:
  Container

Reimplemented from org.pdfclown.objects.PdfObject.

virtual PdfReference org.pdfclown.objects.PdfObject.Reference`[get, inherited]`

Gets the indirect reference of this object.

Reimplemented in org.pdfclown.objects.PdfIndirectObject, and org.pdfclown.objects.PdfReference.

Referenced by org.pdfclown.objects.PdfIndirectObject.Compress(), org.pdfclown.objects.Tree< TKey, TValue >.Remove(), and org.pdfclown.objects.Cloner.Visit().

PdfDirectObject org.pdfclown.objects.PdfDictionary.this[PdfName key]`[get, set]`

override bool org.pdfclown.objects.PdfDictionary.Updateable`[get, set]`

Gets/Sets whether the detection of object state changes is enabled.

Reimplemented from org.pdfclown.objects.PdfObject.

Referenced by org.pdfclown.objects.PdfStream.GetBody(), and org.pdfclown.tokens.BaseParser.ParsePdfObject().

override bool org.pdfclown.objects.PdfDictionary.Updated`[get, set]`

Gets/Sets whether the initial state of this object has been modified.

Reimplemented from org.pdfclown.objects.PdfObject.

ICollection<PdfDirectObject> org.pdfclown.objects.PdfDictionary.Values`[get]`

internal override bool org.pdfclown.objects.PdfDictionary.Virtual`[get, set, protected]`

Gets/Sets whether this object acts like a null-object placeholder.

Reimplemented from org.pdfclown.objects.PdfObject.

Copyright 2006-2013 Stefano Chizzolini. For more information, please visit PDF Clown home page.