List of usage examples for java.lang Integer valueOf
@HotSpotIntrinsicCandidate public static Integer valueOf(int i)
From source file:Main.java
public static int[] convertToIntegerTime(String time) { final String t = time; int[] result = new int[2]; result[0] = Integer.valueOf(t.substring(0, 2)); result[1] = Integer.valueOf(t.substring(3, 5)); return result; }
From source file:Main.java
@SuppressWarnings("deprecation") public static int getAPIVersion() { int APIVersion; try {//from w w w. j a va 2 s. c om APIVersion = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { APIVersion = 0; } return APIVersion; }
From source file:Main.java
public static int[] getYMD(String date) { int[] dateYMD = new int[3]; String[] strings = date.split("-"); dateYMD[0] = Integer.valueOf(strings[0]); dateYMD[1] = Integer.valueOf(strings[1]); dateYMD[2] = Integer.valueOf(strings[2].split(" ")[0]); return dateYMD; }
From source file:Main.java
@SuppressWarnings("deprecation") public static int getAndroidSDKVersion() { int version = 0; try {//from w ww.ja v a2 s. c o m version = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { } return version; }
From source file:Main.java
public static String getLabelForDuration(int ms) { if (ms <= 0) { return null; }//from ww w . j a va 2 s . co m return String.format("%02d:%02d", Integer.valueOf(ms / 60000), Integer.valueOf(ms / 1000 % 60)); }
From source file:Main.java
public static boolean IsFroyoOrLater() { if (SDK == null) SDK = Integer.valueOf(Integer.parseInt(Build.VERSION.SDK)); if (SDK.intValue() >= 8) return true; return false; }
From source file:Main.java
public static int getAPIVersion() { int APIVersion; try {//from w w w. j a v a 2s. c o m APIVersion = Integer.valueOf(android.os.Build.VERSION.SDK); } catch (NumberFormatException e) { APIVersion = 0; } return APIVersion; }
From source file:Main.java
public static boolean IsHoneyOrlater() { if (SDK == null) SDK = Integer.valueOf(Integer.parseInt(Build.VERSION.SDK)); if (SDK.intValue() >= 11) return true; return false; }
From source file:Main.java
public static Color parseToColor(String rgbString) { if (rgbString == null) return null; int rgb = Integer.valueOf(rgbString); return new Color(rgb); }
From source file:Main.java
public static Integer getInt(String key) { return Integer.valueOf(sp.getInt(key, -1)); }