org.ucl.xpath
Class RangeResultSequence

java.lang.Object
  extended byorg.ucl.xpath.ResultSequence
      extended byorg.ucl.xpath.RangeResultSequence

public class RangeResultSequence
extends ResultSequence

A range expression can be used to construct a sequence of consecutive integers.


Constructor Summary
RangeResultSequence(int start, int end)
          set the start and end of the range result sequence
 
Method Summary
 void add(AnyType item)
          item is an integer to add to the range.
 void clear()
          clear range
 void concat(ResultSequence rs)
          remove the tail from the range given.
 ResultSequence create_new()
          create new result sequence
 boolean empty()
          asks if the range is empty?
 AnyType first()
          retrieve the first item
 AnyType get(int i)
          get item in index i
 java.util.ListIterator iterator()
          interate through range.
 void release()
          release
 int size()
          get the size
 
Methods inherited from class org.ucl.xpath.ResultSequence
string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeResultSequence

public RangeResultSequence(int start,
                           int end)
set the start and end of the range result sequence

Parameters:
start - is the integer position of the start of range.
end - is the integer position of the end of range.
Method Detail

add

public void add(AnyType item)
item is an integer to add to the range.

Specified by:
add in class ResultSequence
Parameters:
item - is an integer.

concat

public void concat(ResultSequence rs)
remove the tail from the range given.

Specified by:
concat in class ResultSequence
Parameters:
rs - is the range

iterator

public java.util.ListIterator iterator()
interate through range.

Specified by:
iterator in class ResultSequence
Returns:
tail

get

public AnyType get(int i)
Description copied from class: ResultSequence
get item in index i

Specified by:
get in class ResultSequence
Parameters:
i - is the position.
Returns:
item from range

size

public int size()
Description copied from class: ResultSequence
get the size

Specified by:
size in class ResultSequence
Returns:
size

clear

public void clear()
clear range

Specified by:
clear in class ResultSequence

create_new

public ResultSequence create_new()
create new result sequence

Specified by:
create_new in class ResultSequence
Returns:
null

first

public AnyType first()
Description copied from class: ResultSequence
retrieve the first item

Overrides:
first in class ResultSequence
Returns:
first item in range

empty

public boolean empty()
asks if the range is empty?

Overrides:
empty in class ResultSequence
Returns:
boolean

release

public void release()
release

Overrides:
release in class ResultSequence