gpt4 book ai didi

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

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

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

XMLGregorianCalendarImpl.add介绍

[英]Add duration to this instance.

The computation is specified in XML Schema 1.0 Part 2, Appendix E, Adding durations to dateTimes>. date/time field mapping table defines the mapping from XML Schema 1.0 dateTime fields to this class' representation of those fields.
[中]将duration添加到此实例。
计算在XML Schema 1.0 Part 2, Appendix E, Adding durations to dateTimes>中指定。date/time field mapping table定义了从XMLSchema 1.0dateTime字段到这些字段的此类表示的映射。

代码示例

代码示例来源: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));
  }
}

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