1 19 20 package org.netbeans.modules.editor.bookmarks; 21 22 import java.net.URL ; 23 24 30 31 public class FileBookmarks { 32 33 private URL url; 34 35 private int[] bookmarkLineIndexes; 36 37 FileBookmarks(URL url, int[] lineIndexes) { 38 this.url = url; 39 this.bookmarkLineIndexes = lineIndexes; 40 } 41 42 public final URL getURL() { 43 return url; 44 } 45 46 public final int getBookmarkCount() { 47 return bookmarkLineIndexes.length; 48 } 49 50 public final int getBookmarkLineIndex(int bookmarkIndex) { 51 return bookmarkLineIndexes[bookmarkIndex]; 52 } 53 54 public String toString() { 55 StringBuffer sb = new StringBuffer (); 56 sb.append("url="); sb.append(url); 58 sb.append(" { "); for (int i = 0; i < bookmarkLineIndexes.length; i++) { 60 sb.append(bookmarkLineIndexes[i]); 61 } 62 sb.append("}"); return sb.toString(); 64 } 65 66 } 67 68 | Popular Tags |