DestinationCollection

Inheritance: java.lang.Object

All Implemented Interfaces: java.lang.Iterable

public final class DestinationCollection implements Iterable<System.Collections.Generic.KeyValuePair<String,Object>>

Class represents the collection of all destinations (a name tree mapping name strings to destinations (see 12.3.2.3, “Named Destinations”) and (see 7.7.4, “Name Dictionary”)) in the pdf document.

Methods

MethodDescription
size()Gets the number of elements contained in the collection.
isReadOnly()Gets a value indicating whether the collection is read-only.
get_Item(int index)Gets the destination object by index.
getPageNumber(String destinameName, boolean useCache)Returns the page number of destination by the name.
getExplicitDestination(String destinameName, boolean useCache)Returns the explicit destination by the name.
iterator()Returns the enumerator.
indexOf(System.Collections.Generic.KeyValuePair<String,Object> value)Returns the index of destination in collection.
contains(System.Collections.Generic.KeyValuePair<String,Object> value)Determines whether this instance contains the object.
copyTo(System.Collections.Generic.KeyValuePair<String,Object>[] array, int arrayIndex)Copies the elements of the collection to an Array, starting at a particular Array index.
add(System.Collections.Generic.KeyValuePair<String,Object> item)Adds the specified item.
clear()Collection is read-only.
remove(System.Collections.Generic.KeyValuePair<String,Object> item)Removes the specified item.

size()

public int size()

Gets the number of elements contained in the collection.

Returns: int - int value

isReadOnly()

public boolean isReadOnly()

Gets a value indicating whether the collection is read-only.

Returns: boolean - boolean value

get_Item(int index)

public System.Collections.Generic.KeyValuePair<String,Object> get_Item(int index)

Gets the destination object by index.

Parameters:

ParameterTypeDescription
indexintThe index of destination to get.

Returns: KeyValuePair - Destination.

getPageNumber(String destinameName, boolean useCache)

public int getPageNumber(String destinameName, boolean useCache)

Returns the page number of destination by the name.

Parameters:

ParameterTypeDescription
destinameNamejava.lang.StringThe name of destination.
useCachebooleanDetermines whether cached version of collection is used or not.

Returns: int - The page number if destination was found; otherwise, -1.

getExplicitDestination(String destinameName, boolean useCache)

public ExplicitDestination getExplicitDestination(String destinameName, boolean useCache)

Returns the explicit destination by the name.

Parameters:

ParameterTypeDescription
destinameNamejava.lang.StringThe name of destination.
useCachebooleanDetermines whether cached version of collection is used or not.

Returns: ExplicitDestination - The ExplicitDestination object for destination found; otherwise, null.

iterator()

public System.Collections.IEnumerator<System.Collections.Generic.KeyValuePair<String,Object>> iterator()

Returns the enumerator.

Returns: com.aspose.ms.System.Collections.IEnumerator<com.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object» - The enumerator.

indexOf(System.Collections.Generic.KeyValuePair<String,Object> value)

public int indexOf(System.Collections.Generic.KeyValuePair<String,Object> value)

Returns the index of destination in collection.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object>The value to find.

Returns: int - The index of destination in collection.

contains(System.Collections.Generic.KeyValuePair<String,Object> value)

public boolean contains(System.Collections.Generic.KeyValuePair<String,Object> value)

Determines whether this instance contains the object.

Parameters:

ParameterTypeDescription
valuecom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object>The value to find.

Returns: boolean - true if [contains] [the specified value]; otherwise, false .

copyTo(System.Collections.Generic.KeyValuePair<String,Object>[] array, int arrayIndex)

public void copyTo(System.Collections.Generic.KeyValuePair<String,Object>[] array, int arrayIndex)

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

Parameters:

ParameterTypeDescription
arraycom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object>[]The one-dimensional Array that is the destination of the elements copied from collection
arrayIndexintThe zero-based index in array at which copying begins.

add(System.Collections.Generic.KeyValuePair<String,Object> item)

public void add(System.Collections.Generic.KeyValuePair<String,Object> item)

Adds the specified item. Collection is read-only. Always throws NotSupportedException exception.

Parameters:

ParameterTypeDescription
itemcom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object>The item.

clear()

public void clear()

Collection is read-only. Always throws NotSupportedException exception.

remove(System.Collections.Generic.KeyValuePair<String,Object> item)

public boolean remove(System.Collections.Generic.KeyValuePair<String,Object> item)

Removes the specified item. Collection is read-only. Always throws NotSupportedException exception.

not supportd yet.

Parameters:

ParameterTypeDescription
itemcom.aspose.ms.System.Collections.Generic.KeyValuePair<java.lang.String,java.lang.Object>The item.

Returns: boolean - boolean value