SalesPoint v3.3 API

sale
Class Step

java.lang.Object
  extended by sale.Step
All Implemented Interfaces:
Serializable, Time

public class Step
extends Object
implements Time

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

Since:
v2.0
Author:
Sven Matznick
See Also:
Serialized Form

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

Constructor Detail

Step

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


Step

public Step(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(Object oTime)
             throws IllegalArgumentException
Set the given Long as the new time value.

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

getTime

public Object getTime()
Get the current time.

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

goAhead

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

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

getDefaultInterval

public Object getDefaultInterval()
Get the default time interval.

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

getTimeStamp

public Comparable<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.
Override:
Never

toString

public String toString()
Return the current time.

Overrides:
toString in class Object
Returns:
a String describing the current time
Override:
Never

SalesPoint v3.3 API