gpt4 book ai didi

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

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

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

XMLGregorianCalendarImpl.setEon介绍

[英]Set high order part of XSD dateTime year field.

Unset this field by invoking the setter with a parameter value of null.
[中]设置XSDdateTime年字段的高阶部分。
通过调用参数值为[$1$]的setter来取消设置此字段。

代码示例

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

/**
 * <p>Set low and high order component of XSD <code>dateTime</code> year field.</p>
 *
 * <p>Unset this field by invoking the setter with a parameter value of <code>null</code>.</p>
 *
 * @param year value constraints summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
 *
 * @throws IllegalArgumentException if <code>year</code> parameter is
 * outside value constraints for the field as specified in
 * <a href="#datetimefieldmapping">date/time field mapping table</a>.
 */
public void setYear(BigInteger year) {
  if (year == null) {
    this.eon = null;
    this.year = DatatypeConstants.FIELD_UNDEFINED;
  } else {
    BigInteger temp = year.remainder(BILLION);
    this.year = temp.intValue();
    setEon(year.subtract(temp));
  }
}

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

/**
 * <p>Set low and high order component of XSD <code>dateTime</code> year field.</p>
 *
 * <p>Unset this field by invoking the setter with a parameter value of <code>null</code>.</p>
 *
 * @param year value constraints summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
 *
 * @throws IllegalArgumentException if <code>year</code> parameter is
 * outside value constraints for the field as specified in
 * <a href="#datetimefieldmapping">date/time field mapping table</a>.
 */
public void setYear(BigInteger year) {
  if (year == null) {
    this.eon = null;
    this.year = DatatypeConstants.FIELD_UNDEFINED;
  } else {
    BigInteger temp = year.remainder(BILLION);
    this.year = temp.intValue();
    setEon(year.subtract(temp));
  }
}

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

/**
 * <p>Set year of XSD <code>dateTime</code> year field.</p>
 *
 * <p>Unset this field by invoking the setter with a parameter value of
 * {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
 *
 * <p>Note: if the absolute value of the <code>year</code> parameter
 * is less than 10^9, the eon component of the XSD year field is set to
 * <code>null</code> by this method.</p>
 *
 * @param year value constraints are summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
 *   If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to <code>null</code>.
 */
public void setYear(int year) {
  if (year == DatatypeConstants.FIELD_UNDEFINED) {
    this.year = DatatypeConstants.FIELD_UNDEFINED;
    this.eon = null;
  } else if (Math.abs(year) < BILLION.intValue()) {
    this.year = year;
    this.eon = null;
  } else {
    BigInteger theYear = BigInteger.valueOf((long) year);
    BigInteger remainder = theYear.remainder(BILLION);
    this.year = remainder.intValue();
    setEon(theYear.subtract(remainder));
  }
}

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

/**
 * <p>Set year of XSD <code>dateTime</code> year field.</p>
 *
 * <p>Unset this field by invoking the setter with a parameter value of
 * {@link DatatypeConstants#FIELD_UNDEFINED}.</p>
 *
 * <p>Note: if the absolute value of the <code>year</code> parameter
 * is less than 10^9, the eon component of the XSD year field is set to
 * <code>null</code> by this method.</p>
 *
 * @param year value constraints are summarized in <a href="#datetimefield-year">year field of date/time field mapping table</a>.
 *   If year is {@link DatatypeConstants#FIELD_UNDEFINED}, then eon is set to <code>null</code>.
 */
public void setYear(int year) {
  if (year == DatatypeConstants.FIELD_UNDEFINED) {
    this.year = DatatypeConstants.FIELD_UNDEFINED;
    this.eon = null;
  } else if (Math.abs(year) < BILLION.intValue()) {
    this.year = year;
    this.eon = null;
  } else {
    BigInteger theYear = BigInteger.valueOf((long) year);
    BigInteger remainder = theYear.remainder(BILLION);
    this.year = remainder.intValue();
    setEon(theYear.subtract(remainder));
  }
}

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