Package org.gvsig.timesupport
Interface EditableRelativeInstant
- All Superinterfaces:
Cloneable,org.gvsig.tools.lang.Cloneable,Instant,RelativeInstant,Time
The RelativeInstant ins inmutable, but sometimes is necessary to
edit it. This class is an editable copy of a realtive instant that
cab be edited.
A huge part of the documentation of this class has been retrieved from the joda-time library.
- Version:
- $Id$
- Author:
- gvSIG Team
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddDays(int days) Add a number of days to the date.voidaddHours(int hours) Add a number of hours to the date.voidaddMillis(int millis) Add a number of millis to the date.voidaddMinutes(int minutes) Add a number of minutes to the date.voidaddSeconds(int seconds) Add a number of seconds to the date.voidaddYears(int years) Add a number of years to the date.voidsetDate(int year, int monthOfYear, int dayOfMonth) Set the date from fields.voidsetTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond) Set the time from fields.Methods inherited from interface org.gvsig.tools.lang.Cloneable
cloneMethods inherited from interface org.gvsig.timesupport.RelativeInstant
compareTo, getDayOfMonth, getEditableCopy, getHourOfDay, getMillisOfSecond, getMinuteOfDay, getMinuteOfHour, getMonthOfYear, getSecondOfDay, getSecondOfMinute, getYear, toDate, toMillisMethods inherited from interface org.gvsig.timesupport.Time
getChronology, intersects, isAbsolute, isInstant, isInterval, isRelative
-
Method Details
-
setTime
void setTime(int hour, int minuteOfHour, int secondOfMinute, int millisOfSecond) Set the time from fields. The date part of this object will be unaffected.- Parameters:
hour- the hourminuteOfHour- the minute of the hoursecondOfMinute- the second of the minutemillisOfSecond- the millisecond of the second- Throws:
IllegalArgumentException- if the value is invalid
-
setDate
void setDate(int year, int monthOfYear, int dayOfMonth) Set the date from fields. The time part of this object will be unaffected.- Parameters:
year- the yearmonthOfYear- the month of the yeardayOfMonth- the day of the month- Throws:
IllegalArgumentException- if the value is invalid
-
addYears
void addYears(int years) Add a number of years to the date.- Parameters:
years- the years to add- Throws:
IllegalArgumentException- if the value is invalid
-
addDays
void addDays(int days) Add a number of days to the date.- Parameters:
days- the days to add- Throws:
IllegalArgumentException- if the value is invalid
-
addHours
void addHours(int hours) Add a number of hours to the date.- Parameters:
hours- the hours to add- Throws:
IllegalArgumentException- if the value is invalid
-
addMinutes
void addMinutes(int minutes) Add a number of minutes to the date.- Parameters:
minutes- the minutes to add- Throws:
IllegalArgumentException- if the value is invalid
-
addSeconds
void addSeconds(int seconds) Add a number of seconds to the date.- Parameters:
seconds- the seconds to add- Throws:
IllegalArgumentException- if the value is invalid
-
addMillis
void addMillis(int millis) Add a number of millis to the date.- Parameters:
millis- the millis to add- Throws:
IllegalArgumentException- if the value is invalid
-