org.apache.commons.functor.generator.util
Class LongRange

java.lang.Object
  extended by org.apache.commons.functor.generator.BaseGenerator<Long>
      extended by org.apache.commons.functor.generator.util.LongRange
All Implemented Interfaces:
Generator<Long>

public final class LongRange
extends BaseGenerator<Long>

A generator for the range from (inclusive) to to (exclusive).

Since:
1.0
Version:
$Revision: 1156805 $ $Date: 2011-08-11 22:15:35 +0200 (Thu, 11 Aug 2011) $
Author:
Jason Horman (jason@jhorman.org), Rodney Waldhoff

Constructor Summary
LongRange(long from, long to)
          Create a new LongRange.
LongRange(long from, long to, long step)
          Create a new LongRange.
LongRange(Number from, Number to)
          Create a new LongRange.
LongRange(Number from, Number to, Number step)
          Create a new LongRange.
 
Method Summary
 boolean equals(Object obj)
          
 int hashCode()
          
 void run(UnaryProcedure<? super Long> proc)
          Generators must implement this method.
 String toString()
          
 
Methods inherited from class org.apache.commons.functor.generator.BaseGenerator
getWrappedGenerator, isStopped, stop, to, to, toCollection
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LongRange

public LongRange(Number from,
                 Number to)
Create a new LongRange.

Parameters:
from - start
to - end

LongRange

public LongRange(Number from,
                 Number to,
                 Number step)
Create a new LongRange.

Parameters:
from - start
to - end
step - increment

LongRange

public LongRange(long from,
                 long to)
Create a new LongRange.

Parameters:
from - start
to - end

LongRange

public LongRange(long from,
                 long to,
                 long step)
Create a new LongRange.

Parameters:
from - start
to - end
step - increment
Method Detail

run

public void run(UnaryProcedure<? super Long> proc)
Generators must implement this method.

Parameters:
proc - UnaryProcedure to run

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.