protected void setCurrentNode(){ if (currentNode == null){ currentNode = new BookMark(this); }else { currentNode.recordCursorPosition(); } }
/** * Set the cursor position of VTDNav object corresponding to the internal reference * position of the embedded VTDNav object * @return * */ final public boolean setCursorPosition(){ return setCursorPosition(vn1); } /**
/** * BookMark constructor with an instance of vn * as input * @param vn */ public BookMark(VTDNav vn){ bind(vn); recordCursorPosition(vn); }
BookMark bm = new BookMark(this); bm.recordCursorPosition(); while(i>1 && toElement(VTDNav.NEXT_SIBLING)){ i--; if (i==1 && toElement(VTDNav.NEXT_SIBLING)){ }else bm.setCursorPosition(); return (((long)len)<<32)|so;
BookMark b = new BookMark(nav); b.setCursorPosition(); wordPositions.add(Pair.of(nav.getCurrentIndex(), b)); wordPosition.getValue().setCursorPosition();
public class BookMarkActivity extends ActionBarActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.listview); DatabaseBookMark db = new DatabaseBookMark(this); Log.d("Insert: ", "Inserting .."); db.addBookMark(new BookMark("Ravi", "9100000000")); db.addBookMark(new BookMark("Srinivas", "9199999999")); db.addBookMark(new BookMark("Tommy", "9522222222")); db.addBookMark(new BookMark("Karthik", "9533333333")); // Reading all contacts ArrayList<BookMark> bookmarks = db.getAllBookMarks(); // ADDED ListView lv = (ListView) findViewById(R.id.list_view); lv.setAdapter(new BookmarkAdapter(this,bookmarks)); } }
/** * Compare two bookmarks to ensure they represent the same * node in the same VTDnav instance */ public final boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof BookMark)) return false; return deepEquals((BookMark) obj); }
/** * Record cursor position of the VTDNav object as embedded in the * bookmark * * @return * */ final public boolean recordCursorPosition(){ return recordCursorPosition(vn1); }
BookMark bm = new BookMark(this); bm.recordCursorPosition(); while(i>1 && toElement(VTDNav.NEXT_SIBLING)){ i--; if (i==1 && toElement(VTDNav.NEXT_SIBLING)){ }else bm.setCursorPosition(); return (((long)len)<<32)|so;
/** * Compare the bookmarks to ensure they represent the same * node in the same VTDnav instance * @param bm2 * @return */ public final boolean equals(BookMark bm2) { if (this == bm2) return true; return deepEquals(bm2); }
/** * Record cursor position of the VTDNav object as embedded in the * bookmark * * @return * */ final public boolean recordCursorPosition(){ return recordCursorPosition(vn1); }
BookMark bm = new BookMark(this); bm.recordCursorPosition(); while(i>1 && toElement(VTDNav.NEXT_SIBLING)){ i--; if (i==1 && toElement(VTDNav.NEXT_SIBLING)){ }else bm.setCursorPosition(); return (((long)len)<<32)|so;
protected void setCurrentNode(){ if (currentNode == null){ currentNode = new BookMark(this); }else { currentNode.recordCursorPosition(); } }
protected void loadCurrentNode(){ currentNode.setCursorPosition(); } // like toElement, toNode takes an integer that determines the
/** * BookMark constructor with an instance of vn * as input * @param vn */ public BookMark(VTDNav vn){ bind(vn); recordCursorPosition(vn); }
/** * Compare two bookmarks to ensure they represent the same * node in the same VTDnav instance */ public final boolean equals(Object obj) { if (this == obj) return true; if (!(obj instanceof BookMark)) return false; return deepEquals((BookMark) obj); }
/** * Record cursor position of the VTDNav object as embedded in the * bookmark * * @return * */ final public boolean recordCursorPosition(){ return recordCursorPosition(vn1); }