juju.reattore.perfcap.var.impl
Class RangeVar

java.lang.Object
  |
  +--juju.reattore.perfcap.var.impl.RangeVar
All Implemented Interfaces:
Variable

public class RangeVar
extends java.lang.Object
implements Variable

Integer variable that goes from a start to an end value at a certain step.


Constructor Summary
RangeVar()
           
 
Method Summary
 void begin()
          Initialises and resets this variable.
 void end()
          Called when done with this variable.
 java.lang.String getName()
          The name of this variable.
 java.lang.Object getValue()
          The current value of this variable.
 boolean hasNext()
          Returns true if there are more values in this sequence.
 void next()
          Advances to the next value.
 void setEnd(int end)
          Final, inclusive value.
 void setName(java.lang.String name)
          The name to identify this variable.
 void setStart(int start)
          Start/initial value.
 void setStep(int val)
          Step to increment this value as.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeVar

public RangeVar()
Method Detail

setName

public void setName(java.lang.String name)
The name to identify this variable.

Parameters:
name - The name.

setStart

public void setStart(int start)
Start/initial value.

Parameters:
start - The initial value.

setEnd

public void setEnd(int end)
Final, inclusive value.

Parameters:
end - End value.

setStep

public void setStep(int val)
Step to increment this value as. May be negative.

Parameters:
val - The step.

getName

public java.lang.String getName()
Description copied from interface: Variable
The name of this variable.

Specified by:
getName in interface Variable
Returns:
The name.
See Also:
Variable

getValue

public java.lang.Object getValue()
Description copied from interface: Variable
The current value of this variable. May be called many times.

Specified by:
getValue in interface Variable
Returns:
The current value.
See Also:
Variable

hasNext

public boolean hasNext()
Description copied from interface: Variable
Returns true if there are more values in this sequence.

Specified by:
hasNext in interface Variable
Returns:
true if more are available.
See Also:
Variable

next

public void next()
Description copied from interface: Variable
Advances to the next value. #getValue is not valid until this is called.

Specified by:
next in interface Variable
See Also:
Variable

begin

public void begin()
Description copied from interface: Variable
Initialises and resets this variable.

Specified by:
begin in interface Variable
See Also:
Variable

end

public void end()
Description copied from interface: Variable
Called when done with this variable.

Specified by:
end in interface Variable
See Also:
Variable


Copyright © 2002-2003 Michael Hope. All Rights Reserved.