Class BookmarksImpl

java.lang.Object
org.apache.poi.hwpf.usermodel.BookmarksImpl
All Implemented Interfaces:
Bookmarks

public class BookmarksImpl extends Object implements Bookmarks
Implementation of user-friendly interface for document bookmarks
Author:
Sergey Vladimirov (vlsergey {at} gmail {doc} com)
  • Constructor Details

  • Method Details

    • getBookmark

      public Bookmark getBookmark(int index)
      Specified by:
      getBookmark in interface Bookmarks
      Parameters:
      index - bookmark document index
      Returns:
      Bookmark with specified index
    • getBookmarksAt

      public List<Bookmark> getBookmarksAt(int startCp)
    • getBookmarksCount

      public int getBookmarksCount()
      Specified by:
      getBookmarksCount in interface Bookmarks
      Returns:
      count of Bookmarks in document
    • getBookmarksStartedBetween

      public Map<Integer,List<Bookmark>> getBookmarksStartedBetween(int startInclusive, int endExclusive)
      Specified by:
      getBookmarksStartedBetween in interface Bookmarks
      Returns:
      Map of bookmarks started in specified range, where key is start position and value is sorted List of Bookmark
    • remove

      public void remove(int index)
      Description copied from interface: Bookmarks
      Remove bookmark from document (but not the bookmark text)
      Specified by:
      remove in interface Bookmarks
      Parameters:
      index - bookmark document index to be removed