com.ximpleware
Class BookMark

java.lang.Object
  extended by com.ximpleware.BookMark

public class BookMark
extends Object

Bookmark is a single instance of a node position. You can save the cursor's position into a bookMark instance You can also point the cursor to the node position of previously saved bookMark instance.


Constructor Summary
BookMark()
          Constructor for BookMark Take no argument
BookMark(VTDNav vn)
          BookMark constructor with an instance of vn as input
 
Method Summary
 void bind(VTDNav vn)
          bind a BookMark object to a VTDNav object the cursor position is set to an invalid state
 boolean compare(BookMark bm1)
          Compare the node positions of two bookMarks
 boolean deepEquals(BookMark bm2)
          Compare the bookmarks to ensure they represent the same node in the same VTDnav instance
 boolean equals(BookMark bm2)
          Compare the bookmarks to ensure they represent the same node in the same VTDnav instance
 boolean equals(Object obj)
          Compare two bookmarks to ensure they represent the same node in the same VTDnav instance
 VTDNav getNav()
          This method returns the embedded VTDNav Object
 int hashCode()
          Returns the hash code which is a unique integer for every node
 boolean recordCursorPosition()
          Record cursor position of the VTDNav object as embedded in the bookmark
 boolean recordCursorPosition(VTDNav vn)
          Record the cursor position This method is implemented to be lenient on loading in that it can load nodes from any VTDNav object if vn is null, return false
 boolean setCursorPosition()
          Set the cursor position of VTDNav object corresponding to the internal reference position of the embedded VTDNav object
 boolean setCursorPosition(VTDNav vn)
          set cursor position This method can only set the cursor position of an VTDNav object identical to its internal copy
 void unbind()
          separate a bookMark object apart from its embedded VTDNav instance
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BookMark

public BookMark()
Constructor for BookMark Take no argument


BookMark

public BookMark(VTDNav vn)
BookMark constructor with an instance of vn as input

Parameters:
vn -
Method Detail

unbind

public final void unbind()
separate a bookMark object apart from its embedded VTDNav instance


bind

public void bind(VTDNav vn)
bind a BookMark object to a VTDNav object the cursor position is set to an invalid state

Parameters:
vn -

getNav

public final VTDNav getNav()
This method returns the embedded VTDNav Object

Returns:
VTDNav

setCursorPosition

public boolean setCursorPosition(VTDNav vn)
set cursor position This method can only set the cursor position of an VTDNav object identical to its internal copy

Parameters:
vn -
Returns:

setCursorPosition

public final boolean setCursorPosition()
Set the cursor position of VTDNav object corresponding to the internal reference position of the embedded VTDNav object

Returns:

recordCursorPosition

public boolean recordCursorPosition(VTDNav vn)
Record the cursor position This method is implemented to be lenient on loading in that it can load nodes from any VTDNav object if vn is null, return false

Parameters:
vn -
Returns:

recordCursorPosition

public final boolean recordCursorPosition()
Record cursor position of the VTDNav object as embedded in the bookmark

Returns:

deepEquals

public final boolean deepEquals(BookMark bm2)
Compare the bookmarks to ensure they represent the same node in the same VTDnav instance

Parameters:
bm2 -
Returns:

equals

public final boolean equals(BookMark bm2)
Compare the bookmarks to ensure they represent the same node in the same VTDnav instance

Parameters:
bm2 -
Returns:

equals

public final boolean equals(Object obj)
Compare two bookmarks to ensure they represent the same node in the same VTDnav instance

Overrides:
equals in class Object

hashCode

public final int hashCode()
Returns the hash code which is a unique integer for every node

Overrides:
hashCode in class Object

compare

public boolean compare(BookMark bm1)
Compare the node positions of two bookMarks

Parameters:
bm1 -
Returns:


Copyright © 2013. All Rights Reserved.