Package org.apache.groovy.dateutil
Class TimeDatumDependentDuration
java.lang.Object
org.apache.groovy.dateutil.BaseDuration
org.apache.groovy.dateutil.DatumDependentDuration
org.apache.groovy.dateutil.TimeDatumDependentDuration
- All Implemented Interfaces:
Comparable<BaseDuration>
The result of mixing a
TimeDuration with a DatumDependentDuration.-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.groovy.dateutil.BaseDuration
BaseDuration.From -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionTimeDatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis) Creates a mixed duration from the given calendar and time fields. -
Method Summary
Modifier and TypeMethodDescriptionSubtracts every calendar and time field ofrhs, returning aTimeDatumDependentDuration.Keeps this duration's years and months and subtractsrhs's day and time fields, returning aTimeDatumDependentDuration.Adds every calendar and time field ofrhs, returning aTimeDatumDependentDuration.Keeps this duration's years and months and addsrhs's day and time fields, returning aTimeDatumDependentDuration.Methods inherited from class org.apache.groovy.dateutil.DatumDependentDuration
plus, plusMethods inherited from class org.apache.groovy.dateutil.BaseDuration
compareTo, getAgo, getDays, getFrom, getHours, getMillis, getMinutes, getMonths, getSeconds, getYears, plus, toMilliseconds, toString
-
Constructor Details
-
TimeDatumDependentDuration
public TimeDatumDependentDuration(int years, int months, int days, int hours, int minutes, int seconds, int millis) Creates a mixed duration from the given calendar and time fields.
-
-
Method Details
-
plus
Keeps this duration's years and months and addsrhs's day and time fields, returning aTimeDatumDependentDuration.- Overrides:
plusin classDatumDependentDuration- Parameters:
rhs- duration to add- Returns:
- the component-wise sum
-
plus
Adds every calendar and time field ofrhs, returning aTimeDatumDependentDuration.- Overrides:
plusin classDatumDependentDuration- Parameters:
rhs- duration to add- Returns:
- the component-wise sum
-
minus
Keeps this duration's years and months and subtractsrhs's day and time fields, returning aTimeDatumDependentDuration.- Overrides:
minusin classDatumDependentDuration- Parameters:
rhs- duration to subtract- Returns:
- the component-wise difference
-
minus
Subtracts every calendar and time field ofrhs, returning aTimeDatumDependentDuration.- Overrides:
minusin classDatumDependentDuration- Parameters:
rhs- duration to subtract- Returns:
- the component-wise difference
-