Java Code Examples for net.bither.bitherj.utils.Utils#isInteger()
The following examples show how to use
net.bither.bitherj.utils.Utils#isInteger() .
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 File: QRCodeTransportPage.java From bitherj with Apache License 2.0 | 6 votes |
public static QRCodeTransportPage formatQrCodeTransport(String text) { if (!QRCodeUtil.verifyBitherQRCode(text)) { return null; } QRCodeTransportPage qrCodetTransportPage = new QRCodeTransportPage(); String[] strArray = QRCodeUtil.splitString(text); if (Utils.isInteger(strArray[0]) && Utils.isInteger(strArray[1])) { int length = strArray[0].length() + strArray[1].length() + 2; qrCodetTransportPage.setSumPage(Integer.valueOf(strArray[0]) + 1); qrCodetTransportPage.setCurrentPage(Integer.valueOf(strArray[1])); qrCodetTransportPage.setContent(text.substring(length)); } else { qrCodetTransportPage.setContent(text); } return qrCodetTransportPage; }
Example 2
Source File: UserPreference.java From bither-desktop-java with Apache License 2.0 | 5 votes |
private int getInt(String key, int defaultValue) { String result = userPreferences.getProperty(key); if (Utils.isEmpty(result)) { return defaultValue; } else { if (Utils.isInteger(result)) { return Integer.valueOf(result); } else { return defaultValue; } } }
Example 3
Source File: UserPreference.java From bither-desktop-java with Apache License 2.0 | 5 votes |
private int getLong(String key, int defaultValue) { String result = userPreferences.getProperty(key); if (Utils.isEmpty(result)) { return defaultValue; } else { if (Utils.isInteger(result)) { return Integer.valueOf(result); } else { return defaultValue; } } }
Example 4
Source File: UserPreference.java From bither-desktop-java with Apache License 2.0 | 5 votes |
private int getInt(String key, int defaultValue) { String result = userPreferences.getProperty(key); if (Utils.isEmpty(result)) { return defaultValue; } else { if (Utils.isInteger(result)) { return Integer.valueOf(result); } else { return defaultValue; } } }
Example 5
Source File: UserPreference.java From bither-desktop-java with Apache License 2.0 | 5 votes |
private int getLong(String key, int defaultValue) { String result = userPreferences.getProperty(key); if (Utils.isEmpty(result)) { return defaultValue; } else { if (Utils.isInteger(result)) { return Integer.valueOf(result); } else { return defaultValue; } } }