Java Code Examples for org.apache.commons.lang3.math.NumberUtils.createInteger()

The following are Jave code examples for showing how to use createInteger() of the org.apache.commons.lang3.math.NumberUtils class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: IPPR2016   File: JsonNumberParser.java   Source Code and License Vote up 5 votes
@Override
public boolean canParse(final String value) {
  try {
    NumberUtils.createInteger(value);
    return true;
  } catch (final Exception e) {
    return false;
  }
}
 
Example 2
Project: IPPR2016   File: DbNumberComposer.java   Source Code and License Vote up 5 votes
@Override
public boolean canCompose(final String value) {
  try {
    NumberUtils.createInteger(value);
    return true;
  } catch (final Exception e) {
    return false;
  }
}
 
Example 3
Project: IPPR2016   File: JsonNumberParser.java   Source Code and License Vote up 4 votes
@Override
public Integer parse(final String value) {
  return NumberUtils.createInteger(value);
}
 
Example 4
Project: IPPR2016   File: DbNumberComposer.java   Source Code and License Vote up 4 votes
@Override
public Integer compose(final String value) {
  return NumberUtils.createInteger(value);
}