gpt4 book ai didi

org.joda.time.field.ZeroIsMaxDateTimeField类的使用及代码示例

转载 作者:知者 更新时间:2024-03-14 19:52:49 25 4
gpt4 key购买 nike

本文整理了Java中org.joda.time.field.ZeroIsMaxDateTimeField类的一些代码示例,展示了ZeroIsMaxDateTimeField类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZeroIsMaxDateTimeField类的具体详情如下:
包路径:org.joda.time.field.ZeroIsMaxDateTimeField
类名称:ZeroIsMaxDateTimeField

ZeroIsMaxDateTimeField介绍

[英]Wraps another field such that zero values are replaced with one more than it's maximum. This is particularly useful for implementing an clockhourOfDay field, where the midnight value of 0 is replaced with 24.

ZeroIsMaxDateTimeField is thread-safe and immutable.
[中]包装另一个字段,使零值替换为大于其最大值的值。这对于实现clockhourOfDay字段特别有用,其中午夜值0被替换为24。
ZeroIsMaxDateTimeField是线程安全且不可变的。

代码示例

代码示例来源:origin: joda-time/joda-time

public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value == 0) {
    value = getMaximumValue();
  }
  return value;
}

代码示例来源:origin: joda-time/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(ReadablePartial instant) {
  return getWrappedField().getMaximumValue(instant) + 1;
}

代码示例来源:origin: joda-time/joda-time

(DateTimeFieldType.hourOfHalfday(), cHoursField, cHalfdaysField);
cClockhourOfDayField = new ZeroIsMaxDateTimeField
  (cHourOfDayField, DateTimeFieldType.clockhourOfDay());
cClockhourOfHalfdayField = new ZeroIsMaxDateTimeField
  (cHourOfHalfdayField, DateTimeFieldType.clockhourOfHalfday());

代码示例来源:origin: joda-time/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue() {
  return getWrappedField().getMaximumValue() + 1;
}

代码示例来源:origin: JodaOrg/joda-time

(DateTimeFieldType.hourOfHalfday(), cHoursField, cHalfdaysField);
cClockhourOfDayField = new ZeroIsMaxDateTimeField
  (cHourOfDayField, DateTimeFieldType.clockhourOfDay());
cClockhourOfHalfdayField = new ZeroIsMaxDateTimeField
  (cHourOfHalfdayField, DateTimeFieldType.clockhourOfHalfday());

代码示例来源:origin: JodaOrg/joda-time

public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value == 0) {
    value = getMaximumValue();
  }
  return value;
}

代码示例来源:origin: joda-time/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(long instant) {
  return getWrappedField().getMaximumValue(instant) + 1;
}

代码示例来源:origin: camunda/camunda-bpm-platform

(DateTimeFieldType.hourOfHalfday(), cHoursField, cHalfdaysField);
cClockhourOfDayField = new ZeroIsMaxDateTimeField
  (cHourOfDayField, DateTimeFieldType.clockhourOfDay());
cClockhourOfHalfdayField = new ZeroIsMaxDateTimeField
  (cHourOfHalfdayField, DateTimeFieldType.clockhourOfHalfday());

代码示例来源:origin: joda-time/joda-time

public long set(long instant, int value) {
  int max = getMaximumValue();
  FieldUtils.verifyValueBounds(this, value, 1, max);
  if (value == max) {
    value = 0;
  }
  return getWrappedField().set(instant, value);
}

代码示例来源:origin: joda-time/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(ReadablePartial instant, int[] values) {
  return getWrappedField().getMaximumValue(instant, values) + 1;
}

代码示例来源:origin: JodaOrg/joda-time

public long set(long instant, int value) {
  int max = getMaximumValue();
  FieldUtils.verifyValueBounds(this, value, 1, max);
  if (value == max) {
    value = 0;
  }
  return getWrappedField().set(instant, value);
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue() {
  return getWrappedField().getMaximumValue() + 1;
}

代码示例来源:origin: camunda/camunda-bpm-platform

public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value == 0) {
    value = getMaximumValue();
  }
  return value;
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(long instant) {
  return getWrappedField().getMaximumValue(instant) + 1;
}

代码示例来源:origin: camunda/camunda-bpm-platform

public long set(long instant, int value) {
  int max = getMaximumValue();
  FieldUtils.verifyValueBounds(this, value, 1, max);
  if (value == max) {
    value = 0;
  }
  return getWrappedField().set(instant, value);
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(ReadablePartial instant) {
  return getWrappedField().getMaximumValue(instant) + 1;
}

代码示例来源:origin: io.virtdata/virtdata-lib-realer

public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value == 0) {
    value = getMaximumValue();
  }
  return value;
}

代码示例来源:origin: JodaOrg/joda-time

/**
 * Get the maximum value for the field, which is one more than the wrapped
 * field's maximum value.
 * 
 * @return the maximum value
 */
public int getMaximumValue(ReadablePartial instant, int[] values) {
  return getWrappedField().getMaximumValue(instant, values) + 1;
}

代码示例来源:origin: org.joda/com.springsource.org.joda.time

public int get(long instant) {
  int value = getWrappedField().get(instant);
  if (value == 0) {
    value = getMaximumValue();
  }
  return value;
}

代码示例来源:origin: joda-time/joda-time

public long add(long instant, int value) {
  return getWrappedField().add(instant, value);
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com