org.joda.time.DateTimeField#getType ( )源码实例Demo

下面列出了org.joda.time.DateTimeField#getType ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: astor   文件: GJChronology.java
/**
 * @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;
}
 
源代码2 项目: coming   文件: Time_18_GJChronology_t.java
/**
 * @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;
}
 
源代码3 项目: coming   文件: Time_18_GJChronology_s.java
/**
 * @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;
}
 
源代码4 项目: coming   文件: Time_6_GJChronology_t.java
/**
 * @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;
}
 
源代码5 项目: astor   文件: ZonedChronology.java
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;
}
 
源代码6 项目: astor   文件: ZonedChronology.java
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;
}
 
源代码7 项目: astor   文件: GJChronology.java
/**
 * @param julianField field from the chronology used before the cutover instant
 * @param gregorianField field from the chronology used at and after the cutover
 * @param rangeField  the range field
 * @param cutoverMillis  the millis of the cutover
 * @param convertByWeekyear
 */
CutoverField(DateTimeField julianField, DateTimeField gregorianField,
             DurationField rangeField, 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();
    if (rangeField == null) {
        rangeField = gregorianField.getRangeDurationField();
        if (rangeField == null) {
            rangeField = julianField.getRangeDurationField();
        }
    }
    iRangeDurationField = rangeField;
}
 
源代码8 项目: coming   文件: Arja_0050_s.java
/**
 * 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));
    }
}
 
源代码9 项目: coming   文件: Elixir_0039_t.java
/**
 * 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));
    }
}
 
源代码10 项目: astor   文件: FieldUtils.java
/**
 * 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));
    }
}
 
源代码11 项目: coming   文件: elixir3_three_t.java
/**
 * 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));
    }
}
 
源代码12 项目: coming   文件: Time_15_FieldUtils_s.java
/**
 * 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));
    }
}
 
源代码13 项目: coming   文件: Time_15_FieldUtils_t.java
/**
 * 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));
    }
}
 
源代码14 项目: astor   文件: DelegatedDateTimeField.java
/**
 * 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);
}
 
源代码15 项目: astor   文件: LimitChronology.java
LimitDateTimeField(DateTimeField field,
                   DurationField durationField,
                   DurationField rangeDurationField,
                   DurationField leapDurationField) {
    super(field, field.getType());
    iDurationField = durationField;
    iRangeDurationField = rangeDurationField;
    iLeapDurationField = leapDurationField;
}
 
源代码16 项目: astor   文件: DelegatedDateTimeField.java
/**
 * Constructor.
 * 
 * @param field  the field being decorated
 * @param rangeField  the range field, null to derive
 * @param type  the field type override
 */
public DelegatedDateTimeField(DateTimeField field, DurationField rangeField, DateTimeFieldType type) {
    super();
    if (field == null) {
        throw new IllegalArgumentException("The field must not be null");
    }
    iField = field;
    iRangeDurationField = rangeField;
    iType = (type == null ? field.getType() : type);
}
 
源代码17 项目: astor   文件: FieldUtils.java
/**
 * 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));
    }
}
 
源代码18 项目: astor   文件: LimitChronology.java
LimitDateTimeField(DateTimeField field,
                   DurationField durationField,
                   DurationField rangeDurationField,
                   DurationField leapDurationField) {
    super(field, field.getType());
    iDurationField = durationField;
    iRangeDurationField = rangeDurationField;
    iLeapDurationField = leapDurationField;
}
 
源代码19 项目: astor   文件: OffsetDateTimeField.java
/**
 * 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);
}
 
源代码20 项目: astor   文件: OffsetDateTimeField.java
/**
 * 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);
}