org.ucl.xpath
Class Focus

java.lang.Object
  extended byorg.ucl.xpath.Focus

public class Focus
extends java.lang.Object

set the focus from a result sequence


Constructor Summary
Focus(ResultSequence rs)
          Sets the _rs to rs and context position to 1.
 
Method Summary
 boolean advance_cp()
          Checks to see if possible to advance rs.
 AnyType context_item()
          Retrieves previous item from current context position.
 int last()
          returns the position of the last item in rs.
 int position()
          returns an integer of the current position.
 void set_position(int p)
          sets the position.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Focus

public Focus(ResultSequence rs)
Sets the _rs to rs and context position to 1.

Parameters:
rs - is a ResultSequence and is set to _rs.
Method Detail

context_item

public AnyType context_item()
Retrieves previous item from current context position.

Returns:
the item from _rs.

advance_cp

public boolean advance_cp()
Checks to see if possible to advance rs.

Returns:
the boolean.

position

public int position()
returns an integer of the current position.

Returns:
the current position of rs.

last

public int last()
returns the position of the last item in rs.

Returns:
the size of rs.

set_position

public void set_position(int p)
sets the position.

Parameters:
p - is the position that is set.