Java Code Examples for javax.xml.bind.DatatypeConverter#parseInt()
The following examples show how to use
javax.xml.bind.DatatypeConverter#parseInt() .
These examples are extracted from open source projects.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: CloverETL-Engine File: CloverIntegerConvertor.java License: GNU Lesser General Public License v2.1 | 5 votes |
public static Integer parseXsdIntToInteger(String value) throws DataConversionException { Integer result = null; try { result = DatatypeConverter.parseInt(value); } catch (Exception e) { logger.fatal("Unable to parse xsd:int to " + Integer.class.getName() + ".", e); throw new DataConversionException("Unable to parse xsd:int to " + Integer.class.getName() + ".", e); } return result; }
Example 2
Source Project: java-client-api File: ValueConverter.java License: Apache License 2.0 | 5 votes |
static public int StringToIntegerPrimitive(String value) { try { return DatatypeConverter.parseInt(value); } catch(Exception e) { throw new IllegalArgumentException("Could not convert to int: "+value, e); } }
Example 3
Source Project: jpmml-model File: NumberUtil.java License: BSD 3-Clause "New" or "Revised" License | 5 votes |
static public Number parseNumber(String value){ try { return DatatypeConverter.parseInt(value); } catch(NumberFormatException nfe){ return DatatypeConverter.parseDouble(value); } }
Example 4
Source Project: OpenEstate-IO File: KyeroUtils.java License: Apache License 2.0 | 4 votes |
public static Integer parseImageAttributeType(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
Example 5
Source Project: OpenEstate-IO File: ImmobiliareItUtils.java License: Apache License 2.0 | 4 votes |
public static Integer parseRooms(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
Example 6
Source Project: OpenEstate-IO File: ImmobiliareItUtils.java License: Apache License 2.0 | 4 votes |
public static Integer parseYear(String value) { value = StringUtils.trimToNull(value); return (value != null) ? DatatypeConverter.parseInt(value) : null; }
Example 7
Source Project: java-client-api File: XsValueImpl.java License: Apache License 2.0 | 4 votes |
public IntValImpl(String value) { this(DatatypeConverter.parseInt(value)); }
Example 8
Source Project: jpmml-model File: NumberUtil.java License: BSD 3-Clause "New" or "Revised" License | 4 votes |
static public Integer parseInteger(String value){ return DatatypeConverter.parseInt(value); }