org.apache.axis.types.YearMonth类的使用及代码示例

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

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

YearMonth介绍

[英]Implementation of the XML Schema type gYearMonth
[中]XML模式类型gYearMonth的实现

代码示例

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

  1. public void setValue(int year, int month, String timezone) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. setTimezone(timezone);
  5. }

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

  1. /**
  2. * Constructs a YearMonth with the given values, including a timezone string
  3. * The timezone is validated but not used.
  4. */
  5. public YearMonth(int year, int month, String timezone) throws NumberFormatException {
  6. setValue(year, month, timezone);
  7. }

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

  1. public void setValue(int year, int month) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. }

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

  1. public void setValue(int year, int month) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. }

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

  1. public void setValue(int year, int month, String timezone) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. setTimezone(timezone);
  5. }

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

  1. public void setValue(int year, int month) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. }

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

  1. /**
  2. * Constructs a YearMonth with the given values
  3. * No timezone is specified
  4. */
  5. public YearMonth(int year, int month) throws NumberFormatException {
  6. setValue(year, month);
  7. }

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

  1. public void setValue(int year, int month, String timezone) throws NumberFormatException {
  2. setYear(year);
  3. setMonth(month);
  4. setTimezone(timezone);
  5. }

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

  1. /**
  2. * Constructs a YearMonth with the given values
  3. * No timezone is specified
  4. */
  5. public YearMonth(int year, int month) throws NumberFormatException {
  6. setValue(year, month);
  7. }

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

  1. /**
  2. * Constructs a YearMonth with the given values, including a timezone string
  3. * The timezone is validated but not used.
  4. */
  5. public YearMonth(int year, int month, String timezone) throws NumberFormatException {
  6. setValue(year, month, timezone);
  7. }

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

  1. /**
  2. * Constructs a YearMonth with the given values
  3. * No timezone is specified
  4. */
  5. public YearMonth(int year, int month) throws NumberFormatException {
  6. setValue(year, month);
  7. }

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

  1. /**
  2. * Constructs a YearMonth with the given values, including a timezone string
  3. * The timezone is validated but not used.
  4. */
  5. public YearMonth(int year, int month, String timezone) throws NumberFormatException {
  6. setValue(year, month, timezone);
  7. }

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

  1. /**
  2. * Construct a YearMonth from a String in the format [-]CCYY-MM
  3. */
  4. public YearMonth(String source) throws NumberFormatException {
  5. int negative = 0;
  6. if (source.charAt(0) == '-') {
  7. negative = 1;
  8. }
  9. if (source.length() < (7 + negative)) {
  10. throw new NumberFormatException(
  11. Messages.getMessage("badYearMonth00"));
  12. }
  13. // look for first '-'
  14. int pos = source.substring(negative).indexOf('-');
  15. if (pos < 0) {
  16. throw new NumberFormatException(
  17. Messages.getMessage("badYearMonth00"));
  18. }
  19. if (negative > 0) pos++; //adjust index for orginal string
  20. setValue(Integer.parseInt(source.substring(0,pos)),
  21. Integer.parseInt(source.substring(pos+1,pos+3)),
  22. source.substring(pos+3));
  23. }

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

  1. /**
  2. * Construct a YearMonth from a String in the format [-]CCYY-MM
  3. */
  4. public YearMonth(String source) throws NumberFormatException {
  5. int negative = 0;
  6. if (source.charAt(0) == '-') {
  7. negative = 1;
  8. }
  9. if (source.length() < (7 + negative)) {
  10. throw new NumberFormatException(
  11. Messages.getMessage("badYearMonth00"));
  12. }
  13. // look for first '-'
  14. int pos = source.substring(negative).indexOf('-');
  15. if (pos < 0) {
  16. throw new NumberFormatException(
  17. Messages.getMessage("badYearMonth00"));
  18. }
  19. if (negative > 0) pos++; //adjust index for orginal string
  20. setValue(Integer.parseInt(source.substring(0,pos)),
  21. Integer.parseInt(source.substring(pos+1,pos+3)),
  22. source.substring(pos+3));
  23. }

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

  1. /**
  2. * Construct a YearMonth from a String in the format [-]CCYY-MM
  3. */
  4. public YearMonth(String source) throws NumberFormatException {
  5. int negative = 0;
  6. if (source.charAt(0) == '-') {
  7. negative = 1;
  8. }
  9. if (source.length() < (7 + negative)) {
  10. throw new NumberFormatException(
  11. Messages.getMessage("badYearMonth00"));
  12. }
  13. // look for first '-'
  14. int pos = source.substring(negative).indexOf('-');
  15. if (pos < 0) {
  16. throw new NumberFormatException(
  17. Messages.getMessage("badYearMonth00"));
  18. }
  19. if (negative > 0) pos++; //adjust index for orginal string
  20. setValue(Integer.parseInt(source.substring(0,pos)),
  21. Integer.parseInt(source.substring(pos+1,pos+3)),
  22. source.substring(pos+3));
  23. }

相关文章