org.geotools.feature.type.DateUtil.parseInt()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(177)

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

DateUtil.parseInt介绍

[英]Parse integer value from text. Integer values are parsed with optional leading sign flag, followed by any number of digits.
[中]从文本中解析整数值。使用可选的前导符号标志(后跟任意位数)解析整数值。

代码示例

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

/**
 * Parse byte value from text. Byte values are parsed with optional leading sign flag, followed
 * by any number of digits.
 *
 * @param text text to be parsed
 * @return converted byte value
 * @throws IllegalArgumentException on parse error
 */
public static byte parseByte(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Byte.MIN_VALUE) || (value > Byte.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (byte) value;
}

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

/**
 * Parse short value from text. Short values are parsed with optional leading sign flag,
 * followed by any number of digits.
 *
 * @param text text to be parsed
 * @return converted short value
 * @throws IllegalArgumentException on parse error
 */
public static short parseShort(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Short.MIN_VALUE) || (value > Short.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (short) value;
}

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

/**
 * Parse char value from text as unsigned 16-bit integer. Char values are parsed with optional
 * leading sign flag, followed by any number of digits.
 *
 * @param text text to be parsed
 * @return converted char value
 * @throws IllegalArgumentException on parse error
 */
public static char parseChar(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Character.MIN_VALUE) || (value > Character.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (char) value;
}

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

int year = parseInt(text);

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

int year = parseInt(text.substring(0, split));

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

int year = parseInt(text.substring(0, split));

代码示例来源:origin: org.geotools/gt-main

/**
 * Parse byte value from text. Byte values are parsed with optional leading
 * sign flag, followed by any number of digits.
 *
 * @param text text to be parsed
 *
 * @return converted byte value
 *
 * @throws IllegalArgumentException on parse error
 */
public static byte parseByte(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Byte.MIN_VALUE) || (value > Byte.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (byte) value;
}

代码示例来源:origin: org.geotools/gt-main

/**
 * Parse short value from text. Short values are parsed with optional
 * leading sign flag, followed by any number of digits.
 *
 * @param text text to be parsed
 *
 * @return converted short value
 *
 * @throws IllegalArgumentException on parse error
 */
public static short parseShort(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Short.MIN_VALUE) || (value > Short.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (short) value;
}

代码示例来源:origin: org.geotools/gt2-main

/**
 * Parse byte value from text. Byte values are parsed with optional leading
 * sign flag, followed by any number of digits.
 *
 * @param text text to be parsed
 *
 * @return converted byte value
 *
 * @throws IllegalArgumentException on parse error
 */
public static byte parseByte(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Byte.MIN_VALUE) || (value > Byte.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (byte) value;
}

代码示例来源:origin: org.geotools/gt2-main

/**
 * Parse short value from text. Short values are parsed with optional
 * leading sign flag, followed by any number of digits.
 *
 * @param text text to be parsed
 *
 * @return converted short value
 *
 * @throws IllegalArgumentException on parse error
 */
public static short parseShort(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Short.MIN_VALUE) || (value > Short.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (short) value;
}

代码示例来源:origin: org.geotools/gt2-main

/**
 * Parse char value from text as unsigned 16-bit integer. Char values are
 * parsed with optional leading sign flag, followed by any number of
 * digits.
 *
 * @param text text to be parsed
 *
 * @return converted char value
 *
 * @throws IllegalArgumentException on parse error
 */
public static char parseChar(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Character.MIN_VALUE) || (value > Character.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (char) value;
}

代码示例来源:origin: org.geotools/gt-main

/**
 * Parse char value from text as unsigned 16-bit integer. Char values are
 * parsed with optional leading sign flag, followed by any number of
 * digits.
 *
 * @param text text to be parsed
 *
 * @return converted char value
 *
 * @throws IllegalArgumentException on parse error
 */
public static char parseChar(String text) throws IllegalArgumentException {
  int value = parseInt(text);
  if ((value < Character.MIN_VALUE) || (value > Character.MAX_VALUE)) {
    throw new IllegalArgumentException("Value out of range");
  }
  return (char) value;
}

代码示例来源:origin: org.geotools/gt-main

int year = parseInt(text);

代码示例来源:origin: org.geotools/gt2-main

int year = parseInt(text);

代码示例来源:origin: org.geotools/gt-main

int year = parseInt(text.substring(0, split));

代码示例来源:origin: org.geotools/gt2-main

int year = parseInt(text.substring(0, split));

代码示例来源:origin: org.geotools/gt-main

int year = parseInt(text.substring(0, split));

代码示例来源:origin: org.geotools/gt2-main

int year = parseInt(text.substring(0, split));

相关文章