org.salespointframework.core
Class Step

java.lang.Object
  extended by org.salespointframework.core.Step
All Implemented Interfaces:
Time

public class Step
extends java.lang.Object
implements Time

This class is an implementation of the Time interface. A Long value is used to represent the time.

Since:
v2.0
Version:
2.0 13/06/1999
Author:
Sven Matznick

Field Summary
private  java.lang.Long m_lDefaultInterval
          Default interval.
private  java.lang.Long m_lTime
          Current time.
 
Constructor Summary
Step()
          Creates a new step with default starting time 0.
Step(java.lang.Long lInitTime)
          Creates a new step with the given long value as the starting time.
 
Method Summary
 java.lang.Object getDefaultInterval()
          Get the default time interval.
 java.lang.Object getTime()
          Get the current time.
 java.lang.Comparable<java.lang.String> getTimeStamp(long lStampNumber)
          Create and return a time stamp.
 void goAhead(java.lang.Object oInterval)
          Increase the time by the given interval.
 void setTime(java.lang.Object oTime)
          Set the given Long as the new time value.
 java.lang.String toString()
          Return the current time.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_lTime

private java.lang.Long m_lTime
Current time.


m_lDefaultInterval

private java.lang.Long m_lDefaultInterval
Default interval.

Constructor Detail

Step

public Step()
Creates a new step with default starting time 0.


Step

public Step(java.lang.Long lInitTime)
Creates a new step with the given long value as the starting time.

Parameters:
lInitTime - a Long: the initial time.
Method Detail

setTime

public void setTime(java.lang.Object oTime)
             throws java.lang.IllegalArgumentException
Set the given Long as the new time value.

Specified by:
setTime in interface Time
Parameters:
oTime - the new time value.
Throws:
java.lang.IllegalArgumentException - if the given object is not convertible to a Long

getTime

public java.lang.Object getTime()
Get the current time.

Specified by:
getTime in interface Time
Returns:
a Long representing the current time.

goAhead

public void goAhead(java.lang.Object oInterval)
             throws java.lang.IllegalArgumentException
Increase the time by the given interval.

Specified by:
goAhead in interface Time
Parameters:
oInterval - the interval to increase time by
Throws:
java.lang.IllegalArgumentException - if the given object is not convertible to a Long

getDefaultInterval

public java.lang.Object getDefaultInterval()
Get the default time interval.

Specified by:
getDefaultInterval in interface Time
Returns:
a Long describing the default time interval of 1.

getTimeStamp

public java.lang.Comparable<java.lang.String> getTimeStamp(long lStampNumber)
Create and return a time stamp.

Specified by:
getTimeStamp in interface Time
Parameters:
lStampNumber - the number of the stamp
Returns:
a fresh time stamp.

toString

public java.lang.String toString()
Return the current time.

Overrides:
toString in class java.lang.Object
Returns:
a String describing the current time