|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.Date
com.silverpeas.calendar.AbstractDateDatable<T>
public abstract class AbstractDateDatable<T extends Datable<? super T>>
User: Yohann Chastagnier Date: 06/12/13
Field Summary |
---|
Fields inherited from interface com.silverpeas.calendar.Datable |
---|
ICAL_PATTERN, ICAL_UTC_PATTERN, ISO_8601_PATTERN, SHORT_ISO_8601_PATTERN |
Constructor Summary | |
---|---|
AbstractDateDatable(long date)
Default constructor. |
Method Summary | |
---|---|
T |
addDays(int amount)
Adds a number of days to the datable instance returning a new one. |
T |
addHours(int amount)
Adds a number of hours to the datable instance returning a new one. |
T |
addMilliseconds(int amount)
Adds a number of milliseconds to the datable instance returning a new one. |
T |
addMinutes(int amount)
Adds a number of minutes to the datable instance returning a new one. |
T |
addMonths(int amount)
Adds a number of months to the datable instance returning a new one. |
T |
addSeconds(int amount)
Adds a number of seconds to the datable instance returning a new one. |
T |
addWeeks(int amount)
Adds a number of weeks to the datable instance returning a new one. |
T |
addYears(int amount)
Adds a number of years to the datable instance returning a new one. |
abstract T |
clone()
Clones itself. |
T |
getBeginOfDay()
Computes first hour, minute, second, millisecond from the datable instance. |
T |
getBeginOfMonth()
Compute the first hour, minute, second, millisecond from the datable instance. |
T |
getBeginOfWeek()
Compute the first hour, minute, second, millisecond from the datable instance. |
T |
getBeginOfWeek(String locale)
Compute the first hour, minute, second, millisecond from the datable instance and a given locale. |
T |
getBeginOfYear()
Compute the first hour, minute, second, millisecond from the datable instance. |
T |
getEndOfDay()
Computes first hour, minute, second, millisecond from the datable instance. |
T |
getEndOfMonth()
Compute the date of the first day in the month from the datable instance. |
T |
getEndOfWeek()
Compute the date of the first day in the week from the datable instance. |
T |
getEndOfWeek(String locale)
Compute the date of the first day in the week from the datable instance and a given locale. |
T |
getEndOfYear()
Compute the date of the first day in the year from the datable instance. |
TimeData |
getTimeDataTo(T anotherDatable)
Compute the time between the datable instance and another one. |
boolean |
isDefined()
Indicates is the date is different from DateUtil.MINIMUM_DATE or
DateUtil.MAXIMUM_DATE . |
boolean |
isNotDefined()
Indicates the opposite of Datable.isDefined() |
protected abstract T |
newInstanceFrom(Date aDate)
Create a new instance from a given date time in milliseconds. |
Methods inherited from class java.util.Date |
---|
after, before, compareTo, equals, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toLocaleString, toString, UTC |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.silverpeas.calendar.Datable |
---|
asDate, getTimeZone, inTimeZone, isAfter, isBefore, isEqualTo, toICal, toICalInUTC, toISO8601, toShortISO8601 |
Constructor Detail |
---|
public AbstractDateDatable(long date)
date
- Method Detail |
---|
public abstract T clone()
Datable
clone
in interface Datable<T extends Datable<? super T>>
clone
in class Date
public TimeData getTimeDataTo(T anotherDatable)
Datable
getTimeDataTo
in interface Datable<T extends Datable<? super T>>
TimeData
.protected abstract T newInstanceFrom(Date aDate)
aDate
- the date time in milliseconds.
public T getBeginOfDay()
Datable
getBeginOfDay
in interface Datable<T extends Datable<? super T>>
public T getEndOfDay()
Datable
getEndOfDay
in interface Datable<T extends Datable<? super T>>
public T getBeginOfWeek()
Datable
getBeginOfWeek
in interface Datable<T extends Datable<? super T>>
public T getEndOfWeek()
Datable
getEndOfWeek
in interface Datable<T extends Datable<? super T>>
public T getBeginOfWeek(String locale)
Datable
getBeginOfWeek
in interface Datable<T extends Datable<? super T>>
public T getEndOfWeek(String locale)
Datable
getEndOfWeek
in interface Datable<T extends Datable<? super T>>
public T getBeginOfMonth()
Datable
getBeginOfMonth
in interface Datable<T extends Datable<? super T>>
public T getEndOfMonth()
Datable
getEndOfMonth
in interface Datable<T extends Datable<? super T>>
public T getBeginOfYear()
Datable
getBeginOfYear
in interface Datable<T extends Datable<? super T>>
public T getEndOfYear()
Datable
getEndOfYear
in interface Datable<T extends Datable<? super T>>
public T addYears(int amount)
Datable
Datable
is unchanged.
addYears
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addMonths(int amount)
Datable
Datable
is unchanged.
addMonths
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addWeeks(int amount)
Datable
Datable
is unchanged.
addWeeks
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addDays(int amount)
Datable
Datable
is unchanged.
addDays
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addHours(int amount)
Datable
Datable
is unchanged.
addHours
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addMinutes(int amount)
Datable
Datable
is unchanged.
addMinutes
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addSeconds(int amount)
Datable
Datable
is unchanged.
addSeconds
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic T addMilliseconds(int amount)
Datable
Datable
is unchanged.
addMilliseconds
in interface Datable<T extends Datable<? super T>>
amount
- the amount to add, may be negative
Datable
with the amount addedpublic boolean isDefined()
Datable
DateUtil.MINIMUM_DATE
or
DateUtil.MAXIMUM_DATE
.
isDefined
in interface Datable<T extends Datable<? super T>>
public boolean isNotDefined()
Datable
Datable.isDefined()
isNotDefined
in interface Datable<T extends Datable<? super T>>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |