当前位置: 首页>>代码示例>>Java>>正文


Java DateTimeField.getType方法代码示例

本文整理汇总了Java中org.joda.time.DateTimeField.getType方法的典型用法代码示例。如果您正苦于以下问题:Java DateTimeField.getType方法的具体用法?Java DateTimeField.getType怎么用?Java DateTimeField.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.joda.time.DateTimeField的用法示例。


在下文中一共展示了DateTimeField.getType方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ZonedDateTimeField

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
ZonedDateTimeField(DateTimeField field,
                   DateTimeZone zone,
                   DurationField durationField,
                   DurationField rangeDurationField,
                   DurationField leapDurationField) {
    super(field.getType());
    if (!field.isSupported()) {
        throw new IllegalArgumentException();
    }
    iField = field;
    iZone = zone;
    iDurationField = durationField;
    iTimeField = useTimeArithmetic(durationField);
    iRangeDurationField = rangeDurationField;
    iLeapDurationField = leapDurationField;
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:17,代码来源:ZonedChronology.java

示例2: CutoverField

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
/**
 * @param julianField field from the chronology used before the cutover instant
 * @param gregorianField field from the chronology used at and after the cutover
 * @param cutoverMillis  the millis of the cutover
 * @param convertByWeekyear
 */
CutoverField(DateTimeField julianField, DateTimeField gregorianField,
             long cutoverMillis, boolean convertByWeekyear) {
    super(gregorianField.getType());
    iJulianField = julianField;
    iGregorianField = gregorianField;
    iCutover = cutoverMillis;
    iConvertByWeekyear = convertByWeekyear;
    // Although average length of Julian and Gregorian years differ,
    // use the Gregorian duration field because it is more accurate.
    iDurationField = gregorianField.getDurationField();

    DurationField rangeField = gregorianField.getRangeDurationField();
    if (rangeField == null) {
        rangeField = julianField.getRangeDurationField();
    }
    iRangeDurationField = rangeField;
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:24,代码来源:GJChronology.java

示例3: DelegatedDateTimeField

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
/**
 * Constructor.
 * 
 * @param field  the field being decorated
 * @param type  the field type override
 */
public DelegatedDateTimeField(DateTimeField field, DateTimeFieldType type) {
    super();
    if (field == null) {
        throw new IllegalArgumentException("The field must not be null");
    }
    iField = field;
    iType = (type == null ? field.getType() : type);
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:15,代码来源:DelegatedDateTimeField.java

示例4: verifyValueBounds

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
/**
 * Verify that input values are within specified bounds.
 * 
 * @param value  the value to check
 * @param lowerBound  the lower bound allowed for value
 * @param upperBound  the upper bound allowed for value
 * @throws IllegalFieldValueException if value is not in the specified bounds
 */
public static void verifyValueBounds(DateTimeField field, 
                                     int value, int lowerBound, int upperBound) {
    if ((value < lowerBound) || (value > upperBound)) {
        throw new IllegalFieldValueException
            (field.getType(), Integer.valueOf(value),
             Integer.valueOf(lowerBound), Integer.valueOf(upperBound));
    }
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:17,代码来源:FieldUtils.java

示例5: LimitDateTimeField

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
LimitDateTimeField(DateTimeField field,
                   DurationField durationField,
                   DurationField rangeDurationField,
                   DurationField leapDurationField) {
    super(field, field.getType());
    iDurationField = durationField;
    iRangeDurationField = rangeDurationField;
    iLeapDurationField = leapDurationField;
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:10,代码来源:LimitChronology.java

示例6: OffsetDateTimeField

import org.joda.time.DateTimeField; //导入方法依赖的package包/类
/**
 * Constructor.
 * 
 * @param field  the field to wrap, like "year()".
 * @param offset  offset to add to field values
 * @throws IllegalArgumentException if offset is zero
 */
public OffsetDateTimeField(DateTimeField field, int offset) {
    this(field, (field == null ? null : field.getType()), offset, Integer.MIN_VALUE, Integer.MAX_VALUE);
}
 
开发者ID:redfish64,项目名称:TinyTravelTracker,代码行数:11,代码来源:OffsetDateTimeField.java


注:本文中的org.joda.time.DateTimeField.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。