Package net.time4j.range
Class Quarters
- All Implemented Interfaces:
- Serializable,- Comparable<Quarters>,- TimeSpan<CalendarUnit>
Represents a time span in gregorian quarter years.
- Since:
- 3.21/4.17
- Author:
- Meno Hochschild
- See Also:
- Serialized Form
- 
Nested Class SummaryNested classes/interfaces inherited from interface net.time4j.engine.TimeSpanTimeSpan.Item<U>
- 
Field SummaryFields
- 
Method SummaryModifier and TypeMethodDescriptionstatic Quartersbetween(CalendarQuarter q1, CalendarQuarter q2)Determines the difference in quarters between given quarter years.static <T extends TimePoint<? super CalendarUnit, T>>
 Quartersbetween(T t1, T t2)Determines the temporal distance between given dates/time-points in gregorian quarter years.static Quartersof(int quarters)Obtains a time span in given gregorian quarter years.static QuartersparsePeriod(String period)Parses the canonical format "PnQ" with possible preceding minus-char.Methods inherited from class net.time4j.range.SingleUnitTimeSpanabs, addTo, compareTo, contains, equals, getAmount, getPartialAmount, getTotalLength, getUnit, hashCode, inverse, isEmpty, isNegative, isPositive, minus, minus, multipliedBy, plus, plus, subtractFrom, toStdDuration, toString, toString
- 
Field Details- 
ZEROConstant for zero gregorian quarter years. 
- 
ONEConstant for exactly one gregorian quarter year. 
 
- 
- 
Method Details- 
ofObtains a time span in given gregorian quarter years. - Parameters:
- quarters- count of gregorian quarter years, maybe negative
- Returns:
- time span in quarter years
- See Also:
- CalendarUnit.QUARTERS
 
- 
betweenDetermines the temporal distance between given dates/time-points in gregorian quarter years. - Type Parameters:
- T- generic type of time-points
- Parameters:
- t1- first time-point
- t2- second time-point
- Returns:
- result of difference in quarter years
- See Also:
- PlainDate,- PlainTimestamp
 
- 
betweenDetermines the difference in quarters between given quarter years. - Parameters:
- q1- first quarter year
- q2- second quarter year
- Returns:
- difference in quarter years
 
- 
parsePeriodParses the canonical format "PnQ" with possible preceding minus-char. - Parameters:
- period- the formatted string to be parsed
- Returns:
- parsed instance
- Throws:
- ParseException- if given argument cannot be parsed
 
 
-