下面列出了org.joda.time.DateTimeUtils#getPeriodType ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}
/**
* 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);
}