Java Code Examples for org.joda.time.DateTimeUtils#getPeriodType()

The following examples show how to use org.joda.time.DateTimeUtils#getPeriodType() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Time_22_BasePeriod_s.java    From coming with MIT License 2 votes vote down vote up
/**
 * Validates a period type, converting nulls to a default value and
 * checking the type is suitable for this instance.
 * 
 * @param type  the type to check, may be null
 * @return the validated type to use, not null
 * @throws IllegalArgumentException if the period type is invalid
 */
protected PeriodType checkPeriodType(PeriodType type) {
    return DateTimeUtils.getPeriodType(type);
}
 
Example 2
Source File: Time_22_BasePeriod_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * Validates a period type, converting nulls to a default value and
 * checking the type is suitable for this instance.
 * 
 * @param type  the type to check, may be null
 * @return the validated type to use, not null
 * @throws IllegalArgumentException if the period type is invalid
 */
protected PeriodType checkPeriodType(PeriodType type) {
    return DateTimeUtils.getPeriodType(type);
}
 
Example 3
Source File: BasePeriod.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Validates a period type, converting nulls to a default value and
 * checking the type is suitable for this instance.
 * 
 * @param type  the type to check, may be null
 * @return the validated type to use, not null
 * @throws IllegalArgumentException if the period type is invalid
 */
protected PeriodType checkPeriodType(PeriodType type) {
    return DateTimeUtils.getPeriodType(type);
}
 
Example 4
Source File: BasePeriod.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Validates a period type, converting nulls to a default value and
 * checking the type is suitable for this instance.
 * 
 * @param type  the type to check, may be null
 * @return the validated type to use, not null
 * @throws IllegalArgumentException if the period type is invalid
 */
protected PeriodType checkPeriodType(PeriodType type) {
    return DateTimeUtils.getPeriodType(type);
}