本文整理了Java中org.apache.axis.types.Year.setValue()
方法的一些代码示例,展示了Year.setValue()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Year.setValue()
方法的具体详情如下:
包路径:org.apache.axis.types.Year
类名称: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));
}
内容来源于网络,如有侵权,请联系作者删除!