railo.runtime.util
Class NumberIterator

java.lang.Object
  extended by railo.runtime.util.NumberIterator

public final class NumberIterator
extends Object

A Number Iterator Implementation to iterate from to


Method Summary
 int current()
           
 int first()
           
 int from()
           
 boolean hasNext()
           
 boolean hasNext(boolean useRecordcount)
           
 boolean hasPrevious()
           
 boolean isAfterLast()
           
 boolean isValid()
           
 int last()
           
static NumberIterator load(double from, double to)
          create a Number Iterator with value from and to
static NumberIterator load(double from, double to, double max)
          create a Number Iterator with value from and to
static NumberIterator load(PageContext pc, NumberIterator ni, Query query, String groupName, boolean caseSensitive)
           
 int next()
           
 int previous()
           
static void release(NumberIterator ni)
           
 void setCurrent(int current)
          sets the current position
 int to()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hasNext

public boolean hasNext()
Returns:
returns if there is a next value

hasNext

public boolean hasNext(boolean useRecordcount)

next

public int next()
Returns:
increment and return new value

hasPrevious

public boolean hasPrevious()
Returns:
returns if there is a previous value

previous

public int previous()
Returns:
decrement and return new value

from

public int from()
Returns:
returns smallest possible value

to

public int to()
Returns:
returns greatest value

first

public int first()
Returns:
set value to first and return

last

public int last()
Returns:
set value to last and return thid value

current

public int current()
Returns:
returns current value

setCurrent

public void setCurrent(int current)
sets the current position

Parameters:
current -

isAfterLast

public boolean isAfterLast()
Returns:
is after last

isValid

public boolean isValid()
Returns:
is pointer on a valid position

load

public static NumberIterator load(double from,
                                  double to)
create a Number Iterator with value from and to

Parameters:
from -
to -
Returns:
NumberIterator

load

public static NumberIterator load(double from,
                                  double to,
                                  double max)
create a Number Iterator with value from and to

Parameters:
from -
to -
max -
Returns:
NumberIterator

load

public static NumberIterator load(PageContext pc,
                                  NumberIterator ni,
                                  Query query,
                                  String groupName,
                                  boolean caseSensitive)
                           throws PageException
Parameters:
ni -
query -
groupName -
caseSensitive -
Returns:
number iterator for group
Throws:
PageException

release

public static void release(NumberIterator ni)
Parameters:
ni - Iterator to release


Copyright © 2012 Railo