CosPdfDictionary

Inheritance: java.lang.Object, com.aspose.pdf.dataeditor.CosPdfPrimitive com.aspose.pdf.dataeditor.CosPdfDictionary, com.aspose.pdf.dataeditor.CosPdfPrimitive, com.aspose.pdf.dataeditor.CosPdfDictionary

All Implemented Interfaces: com.aspose.ms.System.Collections.Generic.IGenericCollection<com.aspose.ms.System.Collections.Generic.KeyValuePair< String, ICosPdfPrimitive », com.aspose.ms.System.Collections.Generic.IGenericDictionary< String, ICosPdfPrimitive >, com.aspose.ms.System.Collections.Generic.IGenericEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair< String, ICosPdfPrimitive », com.aspose.ms.System.Collections.IEnumerable<com.aspose.ms.System.Collections.Generic.KeyValuePair< String, ICosPdfPrimitive », ICosPdfPrimitive, Iterable <com.aspose.ms.System.Collections.Generic.KeyValuePair< String, ICosPdfPrimitive »

public class CosPdfDictionary extends CosPdfPrimitive implements com.aspose.ms.System.Collections.Generic.IGenericDictionary< String , ICosPdfPrimitive >

A class for accessing an object’s dictionary.

Constructors

ConstructorDescription
CosPdfDictionaryCreates a dictionary from resources. @exception ArgumentNullException The resources are null.

Methods

MethodDescription
addSet ICosPdfPrimitive to dictionary.
addSet {@link ICosPdfPrimitive} to dictionary. @exception ArgumentException Throw exception if key/value can’t be edited or removed.
addItemAdd item pair.
addItemAdd item.
clearRemoves all items from the {@link CosPdfDictionary}.
containsDetermines whether the CosPdfDictionary contains a specific value.
containsItemReturn true if contains item
containsKeyDetermines whether the {@link CosPdfDictionary} contains an element with the specified key.
copyToCopies the elements of the CosPdfDictionary to an Array , starting at a particular Array index.
copyToTArrayCopy To Array
createEmptyDictionaryCreates an empty dictionary that will be attached to the document.
createEmptyDictionaryCreates an empty dictionary that will be attached to the page.
get_ItemGets or sets the element with the specified key.
getAllKeysFull collection of keys. Contains editable and not editable keys.
getKeysCollection of editable keys.
getValuesGets an {@link ICollection} containing the values in the {@link CosPdfDictionary}.
isReadOnlyGets a value indicating whether the {@link CosPdfDictionary} is read-only.
iteratorReturns an enumerator that iterates through the collection.
removeRemoves the first occurrence of a specific object from the CosPdfDictionary .
removeRemoves the element with the specified key from the {@link CosPdfDictionary}.
removeItemRemove Item
removeItemByKeyRemove item by key.
set_ItemGets or sets the element with the specified key. @exception ArgumentNullException The key is null. @exception KeyNotFoundException The property is retrieved and key is not found. @exception ArgumentException Throw exception if key can’t be edited/set.
sizeGets the number of elements contained in the {@link CosPdfDictionary}.
toCosPdfDictionaryTries cast this instance to {@link CosPdfDictionary}.
tryGetValueFor access to simple data type like string, name, bool, number. Returns null for other types.
tryGetValueTry to get value

CosPdfDictionary

Creates a dictionary from resources. @exception ArgumentNullException The resources are null.

add

Set ICosPdfPrimitive to dictionary.

add

Set {@link ICosPdfPrimitive} to dictionary. @exception ArgumentException Throw exception if key/value can’t be edited or removed.

addItem

Add item pair.

addItem

Add item.

clear

public final void clear()

Removes all items from the {@link CosPdfDictionary}.

contains

Determines whether the CosPdfDictionary contains a specific value.

containsItem

Return true if contains item

containsKey

Determines whether the {@link CosPdfDictionary} contains an element with the specified key.

copyTo

Copies the elements of the CosPdfDictionary to an Array , starting at a particular Array index.

copyToTArray

Copy To Array

createEmptyDictionary

Creates an empty dictionary that will be attached to the document.

createEmptyDictionary

Creates an empty dictionary that will be attached to the page.

get_Item

Gets or sets the element with the specified key.

getAllKeys

public final com.aspose.ms.System.Collections.Generic.IGenericCollection< String > getAllKeys()

Full collection of keys. Contains editable and not editable keys.

Returns: List of String values

getKeys

public final com.aspose.ms.System.Collections.Generic.IGenericCollection< String > getKeys()

Collection of editable keys.

Returns: List of String values

getValues

public final com.aspose.ms.System.Collections.Generic.IGenericCollection< ICosPdfPrimitive > getValues()

Gets an {@link ICollection} containing the values in the {@link CosPdfDictionary}.

Returns: List of ICosPdfPrimitive instances

isReadOnly

public final boolean isReadOnly()

Gets a value indicating whether the {@link CosPdfDictionary} is read-only.

Returns: true if the {@link CosPdfDictionary} is read-only; otherwise, false.

iterator

public final com.aspose.ms.System.Collections.Generic.IGenericEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair< String , ICosPdfPrimitive >> iterator()

Returns an enumerator that iterates through the collection.

Returns: An enumerator that can be used to iterate through the collection.

remove

Removes the first occurrence of a specific object from the CosPdfDictionary .

remove

Removes the element with the specified key from the {@link CosPdfDictionary}.

removeItem

Remove Item

removeItemByKey

Remove item by key.

set_Item

Gets or sets the element with the specified key. @exception ArgumentNullException The key is null. @exception KeyNotFoundException The property is retrieved and key is not found. @exception ArgumentException Throw exception if key can’t be edited/set.

size

public final int size()

Gets the number of elements contained in the {@link CosPdfDictionary}.

Returns: int value

toCosPdfDictionary

public CosPdfDictionary toCosPdfDictionary()

Tries cast this instance to {@link CosPdfDictionary}.

Returns: null if instance is not {@link CosPdfDictionary} else {@link CosPdfDictionary}.

tryGetValue

For access to simple data type like string, name, bool, number. Returns null for other types.

tryGetValue

Try to get value