gpt4 book ai didi

com.sun.org.apache.xerces.internal.jaxp.datatype.XMLGregorianCalendarImpl.setHour()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-20 22:27:05 24 4
gpt4 key购买 nike

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

XMLGregorianCalendarImpl.setHour介绍

暂无

代码示例

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

public void setHour(int hour) {
  setHour(hour, true);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

public void setHour(int hour) {
  setHour(hour, true);
}

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

private void testHour() {
  // http://www.w3.org/2001/05/xmlschema-errata#e2-45
  if (getHour() == 24) {
    if (getMinute() != 0
        || getSecond() != 0) {
      invalidFieldValue(HOUR, getHour());
    }
    // while 0-24 is acceptable in the lexical space, 24 is not valid in value space
    // W3C XML Schema Part 2, Section 3.2.7.1
    setHour(0, false);
    add(new DurationImpl(true, 0, 0, 1, 0, 0, 0));
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

private void testHour() {
  // http://www.w3.org/2001/05/xmlschema-errata#e2-45
  if (getHour() == 24) {
    if (getMinute() != 0
        || getSecond() != 0) {
      invalidFieldValue(HOUR, getHour());
    }
    // while 0-24 is acceptable in the lexical space, 24 is not valid in value space
    // W3C XML Schema Part 2, Section 3.2.7.1
    setHour(0, false);
    add(new DurationImpl(true, 0, 0, 1, 0, 0, 0));
  }
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

setHour(temp.mod(TWENTY_FOUR).intValue(), false);
carry = new BigDecimal(temp).divide(new BigDecimal(TWENTY_FOUR), BigDecimal.ROUND_FLOOR).toBigInteger();
      break;
    case HOUR:
      setHour(DatatypeConstants.FIELD_UNDEFINED, false);
      break;
    case MINUTE:

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

setHour(temp.mod(TWENTY_FOUR).intValue(), false);
carry = new BigDecimal(temp).divide(new BigDecimal(TWENTY_FOUR), BigDecimal.ROUND_FLOOR).toBigInteger();
      break;
    case HOUR:
      setHour(DatatypeConstants.FIELD_UNDEFINED, false);
      break;
    case MINUTE:

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

/**
 * <p>Set time as one unit, including optional milliseconds.</p>
 *
 * @param hour value constraints are summarized in
 * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
 * @param minute value constraints are summarized in
 * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
 * @param second value constraints are summarized in
 * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
 * @param millisecond value of {@link DatatypeConstants#FIELD_UNDEFINED} indicates this
 *                    optional field is not set.
 *
 * @throws IllegalArgumentException if any parameter is
 * outside value constraints for the field as specified in
 * <a href="#datetimefieldmapping">date/time field mapping table</a>.
 */
public void setTime(int hour, int minute, int second, int millisecond) {
  setHour(hour, false);
  setMinute(minute);
  if (second != 60) {
    setSecond(second);
  } else if ((hour == 23 && minute == 59) || (hour == 0 && minute == 0)) {
    setSecond(second);
  } else {
    invalidFieldValue(SECOND, second);
  }
  setMillisecond(millisecond);
  // must test hour after setting seconds
  testHour();
}

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

/**
 * <p>Set time as one unit, including optional milliseconds.</p>
 *
 * @param hour value constraints are summarized in
 * <a href="#datetimefield-hour">hour field of date/time field mapping table</a>.
 * @param minute value constraints are summarized in
 * <a href="#datetimefield-minute">minute field of date/time field mapping table</a>.
 * @param second value constraints are summarized in
 * <a href="#datetimefield-second">second field of date/time field mapping table</a>.
 * @param millisecond value of {@link DatatypeConstants#FIELD_UNDEFINED} indicates this
 *                    optional field is not set.
 *
 * @throws IllegalArgumentException if any parameter is
 * outside value constraints for the field as specified in
 * <a href="#datetimefieldmapping">date/time field mapping table</a>.
 */
public void setTime(int hour, int minute, int second, int millisecond) {
  setHour(hour, false);
  setMinute(minute);
  if (second != 60) {
    setSecond(second);
  } else if ((hour == 23 && minute == 59) || (hour == 0 && minute == 0)) {
    setSecond(second);
  } else {
    invalidFieldValue(SECOND, second);
  }
  setMillisecond(millisecond);
  // must test hour after setting seconds
  testHour();
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jaxp-ri

BigDecimal fractional) {
setHour(hour, false);

代码示例来源:origin: com.sun.xml.parsers/jaxp-ri

BigDecimal fractional) {
setHour(hour, false);

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