ASPOSE home

com.aspose.words
Class Bookmarks

java.lang.Object
    extended by com.aspose.words.Bookmarks
All Implemented Interfaces:
java.lang.Iterable

public class Bookmarks
extends java.lang.Object

A collection of Bookmark objects that represent the bookmarks in the specified range.

Property Getters/Setters Summary
intgetCount()
           Returns the number of bookmarks in the collection.
Bookmarkget(int index)
           Returns a bookmark at the specified index.
Bookmarkget(java.lang.String bookmarkName)
           Returns a bookmark by name.
 
Method Summary
voidclear()
           Removes all bookmarks from this collection and from the document.
java.util.Iteratoriterator()
          Reserved for internal use.
voidremove(Bookmark bookmark)
           Removes the specified bookmark from the document.
voidremove(java.lang.String bookmarkName)
           Removes a bookmark with the specified name.
voidremoveAt(int index)
           Removes a bookmark at the specified index.
 

Property Getters/Setters Detail

getCount

public int getCount()
Returns the number of bookmarks in the collection.

get

public Bookmark get(int index)
Returns a bookmark at the specified index.

The index is zero-based.

Negative indexes are allowed and indicate access from the back of the collection. For example -1 means the last item, -2 means the second before last and so on.

If index is greater than or equal to the number of items in the list, this returns a null reference.

If index is negative and its absolute value is greater than the number of items in the list, this returns a null reference.

Parameters:
index - An index into the collection.

get

public Bookmark get(java.lang.String bookmarkName)
Returns a bookmark by name.

Returns null if the bookmark with the specified name cannot be found.

Parameters:
bookmarkName - Case-insensitive name of the bookmark.

Method Detail

remove

public void remove(Bookmark bookmark)
           throws java.lang.Exception
Removes the specified bookmark from the document.
Parameters:
bookmark - The bookmark to remove.

remove

public void remove(java.lang.String bookmarkName)
           throws java.lang.Exception
Removes a bookmark with the specified name.
Parameters:
bookmarkName - The case-insensitive name of the bookmark to remove.

removeAt

public void removeAt(int index)
             throws java.lang.Exception
Removes a bookmark at the specified index.
Parameters:
index - The zero-based index of the bookmark to remove.

clear

public void clear()
          throws java.lang.Exception
Removes all bookmarks from this collection and from the document.

iterator

public java.util.Iterator iterator()
Reserved for internal use.

See Also:
          Wiki - the home page for the Aspose.Words Product Documentation that includes Programmer's Guide, Knowledge Base and other articles.
          Aspose.Words Support Forum - our preferred method of support.
          Aspose.Words Team - contact Aspose.Words Team.


ASPOSE home