org.apache.axis.types.Year.setValue()方法的使用及代码示例

x33g5p2x  于2022-02-05 转载在 其他  
字(3.1k)|赞(0)|评价(0)|浏览(83)

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

Year.setValue介绍

暂无

代码示例

代码示例来源:origin: axis/axis

/**
 * Constructs a Year with the given values, including a timezone string
 * The timezone is validated but not used.
 */
public Year(int year, String timezone) throws NumberFormatException {
  setValue(year, timezone);
}

代码示例来源:origin: axis/axis

/**
 * Constructs a Year with the given values
 * No timezone is specified
 */
public Year(int year) throws NumberFormatException {
  setValue(year);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Constructs a Year with the given values
 * No timezone is specified
 */
public Year(int year) throws NumberFormatException {
  setValue(year);
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Constructs a Year with the given values, including a timezone string
 * The timezone is validated but not used.
 */
public Year(int year, String timezone) throws NumberFormatException {
  setValue(year, timezone);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Constructs a Year with the given values
 * No timezone is specified
 */
public Year(int year) throws NumberFormatException {
  setValue(year);
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Constructs a Year with the given values, including a timezone string
 * The timezone is validated but not used.
 */
public Year(int year, String timezone) throws NumberFormatException {
  setValue(year, timezone);
}

代码示例来源:origin: axis/axis

/**
 * Construct a Year from a String in the format [-]CCYY[timezone]
 */
public Year(String source) throws NumberFormatException {
  int negative = 0;
  if (source.charAt(0) == '-') {
    negative = 1;
  }
  if (source.length() < (4 + negative)) {
    throw new NumberFormatException(
        Messages.getMessage("badYear00"));
  }
  // calculate how many more than 4 digits (if any) in the year
  int pos = 4 + negative;  // skip minus sign if present
  while (pos < source.length() && Character.isDigit(source.charAt(pos))) {
    ++pos;
  }
  setValue(Integer.parseInt(source.substring(0,pos)),
       source.substring(pos));
}

代码示例来源:origin: org.apache.axis/com.springsource.org.apache.axis

/**
 * Construct a Year from a String in the format [-]CCYY[timezone]
 */
public Year(String source) throws NumberFormatException {
  int negative = 0;
  if (source.charAt(0) == '-') {
    negative = 1;
  }
  if (source.length() < (4 + negative)) {
    throw new NumberFormatException(
        Messages.getMessage("badYear00"));
  }
  // calculate how many more than 4 digits (if any) in the year
  int pos = 4 + negative;  // skip minus sign if present
  while (pos < source.length() && Character.isDigit(source.charAt(pos))) {
    ++pos;
  }
  setValue(Integer.parseInt(source.substring(0,pos)),
       source.substring(pos));
}

代码示例来源:origin: org.apache.axis/axis

/**
 * Construct a Year from a String in the format [-]CCYY[timezone]
 */
public Year(String source) throws NumberFormatException {
  int negative = 0;
  if (source.charAt(0) == '-') {
    negative = 1;
  }
  if (source.length() < (4 + negative)) {
    throw new NumberFormatException(
        Messages.getMessage("badYear00"));
  }
  // calculate how many more than 4 digits (if any) in the year
  int pos = 4 + negative;  // skip minus sign if present
  while (pos < source.length() && Character.isDigit(source.charAt(pos))) {
    ++pos;
  }
  setValue(Integer.parseInt(source.substring(0,pos)),
       source.substring(pos));
}

相关文章

微信公众号

最新文章

更多