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()
           
 boolean isValid(int current)
           
 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(int from, int to)
           
static NumberIterator load(PageContext pc, NumberIterator ni, Query query, String groupName, boolean caseSensitive)
           
static NumberIterator loadEnd(int from, int to, int end)
           
static NumberIterator loadMax(int from, int to, int max)
           
 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

isValid

public boolean isValid(int current)

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(int from,
                                  int to)

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

loadMax

public static NumberIterator loadMax(int from,
                                     int to,
                                     int max)

loadEnd

public static NumberIterator loadEnd(int from,
                                     int to,
                                     int end)

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