|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sale.CalendarTime
public class CalendarTime
This class is an implementation of the Time
interface.
The time is represented as a Gregorian Calendar.
Only a simple Adapterclass for java.util.GregorianCalendar
Field Summary | |
---|---|
static int |
DATE
Field number for setTimeToCount(int) indicates that the days will be increased by goAhead(java.lang.Object) |
static int |
HOUR
Field number for setTimeToCount(int) indicates that the hours will be increased by goAhead(java.lang.Object) |
static int |
MINUTE
Field number for setTimeToCount(int) indicates that the minutes will be increased by goAhead(java.lang.Object) |
static int |
MONTH
Field number for setTimeToCount(int) indicates that the month will be increased by goAhead(java.lang.Object) |
static int |
SECOND
Field number for setTimeToCount(int) indicates that the seconds will be increased by goAhead(java.lang.Object) |
static int |
YEAR
Field number for setTimeToCount(int) indicates that the years will be increased by goAhead(java.lang.Object) |
Constructor Summary | |
---|---|
CalendarTime()
Creates a new CalendarTime with the current systemtime. |
|
CalendarTime(int year,
int month,
int date,
int hours,
int minutes,
int seconds)
Creates a new CalendarTime with the given starting time |
|
CalendarTime(int year,
int month,
int date,
int hours,
int minutes,
int seconds,
int iTimeToCount)
Creates a new CalendarTime with the given starting time and an int that defines the field which will be increased by goAhead(java.lang.Object) . |
|
CalendarTime(long lTimeInMillis)
Creates a new CalendarTime with the given starting time. |
|
CalendarTime(long lTimeInMillis,
int iTimeToCount)
Creates a new CalendarTime with the given starting time and an int that defines the field which will be increased by goAhead(java.lang.Object) . |
Method Summary | |
---|---|
Calendar |
getCalendar()
Get the adapted Calendar. |
Object |
getDefaultInterval()
Get the default time interval. |
Object |
getTime()
Get the calendars date |
Comparable<String> |
getTimeStamp(long lStampNumber)
Create and return a time stamp. |
void |
goAhead(Object oInterval)
Increment the time by the given time interval. |
void |
setTime(Object oTime)
Set the given date. |
void |
setTimeToCount(int iTime)
Set an int that will define which time field will be increased by goAhead(java.lang.Object) . |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static int SECOND
setTimeToCount(int)
indicates that the seconds will be increased by goAhead(java.lang.Object)
public static int MINUTE
setTimeToCount(int)
indicates that the minutes will be increased by goAhead(java.lang.Object)
public static int HOUR
setTimeToCount(int)
indicates that the hours will be increased by goAhead(java.lang.Object)
public static int DATE
setTimeToCount(int)
indicates that the days will be increased by goAhead(java.lang.Object)
public static int MONTH
setTimeToCount(int)
indicates that the month will be increased by goAhead(java.lang.Object)
public static int YEAR
setTimeToCount(int)
indicates that the years will be increased by goAhead(java.lang.Object)
Constructor Detail |
---|
public CalendarTime()
public CalendarTime(long lTimeInMillis)
lTimeInMillis
- a long representing the time in millisecondspublic CalendarTime(long lTimeInMillis, int iTimeToCount)
goAhead(java.lang.Object)
.
lTimeInMillis
- a long representing the time in millisecondsiTimeToCount
- an int representing the field which will be increased by goAhead(java.lang.Object)
YEAR
,
MONTH
,
DATE
,
HOUR
,
MINUTE
,
SECOND
public CalendarTime(int year, int month, int date, int hours, int minutes, int seconds)
year
- an int representing the Year you want to start withmonth
- an int representing the Month you want to start withdate
- an int representing the Day you want to start withhours
- an int representing the Hour you want to start withminutes
- an int representing the Minute you want to start withseconds
- an int representing the Second you want to start withpublic CalendarTime(int year, int month, int date, int hours, int minutes, int seconds, int iTimeToCount)
goAhead(java.lang.Object)
.
year
- an int representing the Year you want to start withmonth
- an int representing the Month you want to start withdate
- an int representing the Day you want to start withhours
- an int representing the Hour you want to start withminutes
- an int representing the Minute you want to start withseconds
- an int representing the Second you want to start withiTimeToCount
- an int representing the field which will be increased by goAhead(java.lang.Object)
YEAR
,
MONTH
,
DATE
,
HOUR
,
MINUTE
,
SECOND
Method Detail |
---|
public void setTime(Object oTime) throws IllegalArgumentException
setTime
in interface Time
oTime
- a java.util.Date representing the date to be set
IllegalArgumentException
- if Parameter is not a java.util.Datepublic void setTimeToCount(int iTime)
goAhead(java.lang.Object)
.
iTime
- an int representing a constantYEAR
,
MONTH
,
DATE
,
HOUR
,
MINUTE
,
SECOND
public Object getTime()
getTime
in interface Time
public void goAhead(Object oInterval) throws IllegalArgumentException
goAhead
in interface Time
oInterval
- the interval by which to increment time. Must be an Integer object that gives the
number of days by which to increment.
IllegalArgumentException
- if the given interval is no Integer or is null.public Object getDefaultInterval()
getDefaultInterval
in interface Time
public Calendar getCalendar()
public Comparable<String> getTimeStamp(long lStampNumber)
getTimeStamp
in interface Time
lStampNumber
- the number of the stamp
public String toString()
toString
in class Object
|
SalesPoint v3.3 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |