Package jadex.bdi.examples.alarmclock
Class Time
- java.lang.Object
-
- jadex.bdi.examples.alarmclock.Time
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable
public class Time extends java.lang.Object implements java.lang.Cloneable, java.io.SerializableThe alarm time struct.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Creates and returns a copy of this object.booleanequals(java.lang.Object o)Test for equality.intgetHours()Get the hours.intgetMinutes()Get the minutes.intgetMonth()Get the month.intgetMonthday()Get the monthday.intgetSeconds()Get the seconds.intgetWeekday()Get the weekday.intgetYear()Get the year.inthashCode()Compute the hashcode.voidsetHours(int hours)Set the hours.voidsetMinutes(int minutes)Set the minutes.voidsetMonth(int month)Set the month.voidsetMonthday(int monthday)Set the monthday.voidsetSeconds(int seconds)Set the seconds.voidsetWeekday(int weekday)Set the weekday.voidsetYear(int year)Set the year.
-
-
-
Constructor Detail
-
Time
public Time()
Create a new time.
-
Time
public Time(java.util.Date date)
Create a new time.
-
Time
public Time(int seconds, int minutes, int hours, int weekday, int monthday, int month, int year)Create a new time.- Parameters:
seconds- The seconds.minutes- The minutes.hours- The hours.weekday- The weekday.monthday- The day in month.month- The month.year- The year.
-
-
Method Detail
-
getSeconds
public int getSeconds()
Get the seconds.- Returns:
- The seconds.
-
setSeconds
public void setSeconds(int seconds)
Set the seconds.- Parameters:
seconds- The seconds.
-
getMinutes
public int getMinutes()
Get the minutes.- Returns:
- The minutes.
-
setMinutes
public void setMinutes(int minutes)
Set the minutes.- Parameters:
minutes- The minutes.
-
getHours
public int getHours()
Get the hours.- Returns:
- The hours.
-
setHours
public void setHours(int hours)
Set the hours.- Parameters:
hours- The hours.
-
getWeekday
public int getWeekday()
Get the weekday.- Returns:
- The weekday.
-
setWeekday
public void setWeekday(int weekday)
Set the weekday.- Parameters:
weekday- The weekday.
-
getMonthday
public int getMonthday()
Get the monthday.- Returns:
- The monthday.
-
setMonthday
public void setMonthday(int monthday)
Set the monthday.- Parameters:
monthday- The monthday.
-
getMonth
public int getMonth()
Get the month.- Returns:
- The month.
-
setMonth
public void setMonth(int month)
Set the month.- Parameters:
month- The month.
-
getYear
public int getYear()
Get the year.- Returns:
- The year.
-
setYear
public void setYear(int year)
Set the year.- Parameters:
year- The year.
-
equals
public boolean equals(java.lang.Object o)
Test for equality.- Overrides:
equalsin classjava.lang.Object- Parameters:
o- The object to test.- Returns:
- True if equal.
-
hashCode
public int hashCode()
Compute the hashcode.- Overrides:
hashCodein classjava.lang.Object- Returns:
- The hashcode.
-
clone
public java.lang.Object clone()
Creates and returns a copy of this object. The precise meaning of "copy" may depend on the class of the object. The general intent is that, for any object- Overrides:
clonein classjava.lang.Object
-
-