List of usage examples for java.lang Integer valueOf
@HotSpotIntrinsicCandidate public static Integer valueOf(int i)
From source file:Main.java
@SuppressWarnings("deprecation") public static int getAndroidSDKVersion() { int version = 0; try {//w ww.j a va 2s . com version = Integer.valueOf(Build.VERSION.SDK); } catch (NumberFormatException e) { } return version; }
From source file:Main.java
private static String fullFormat(String string) { String[] split = string.split(DELIM_TIME); return minCheck(Integer.valueOf(split[0])) + DELIM_TIME + minCheck(Integer.valueOf(split[1])); }
From source file:Main.java
public static int getSDKVersionNumber() { int sdkVersion; try {//w w w . j ava 2 s.com sdkVersion = Integer.valueOf(Build.VERSION.SDK_INT); } catch (NumberFormatException e) { sdkVersion = 0; } return sdkVersion; }
From source file:Main.java
public static int getDuration(String duration) { int durations = 0; try {/*from w w w.ja v a 2s . c o m*/ String sArray[] = duration.split(":"); int hour = Integer.valueOf(sArray[0]); int minute = Integer.valueOf(sArray[1]); int second = Integer.valueOf(sArray[2]); return ((hour * 60 + minute) * 60 + second) * 1000; } catch (Exception e) { // TODO: handle exception e.printStackTrace(); } return durations; }
From source file:Main.java
public static String get_date(String args) { // long nowTime=System.currentTimeMillis(); long retime = Integer.valueOf(args).intValue(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); String date = sdf.format(new Date(retime * 1000)); return date;//from ww w.ja v a2s . c om // System.out.print(date); }
From source file:Main.java
private static String getVersionSubdirectoryName(int version) { return String.format((Locale) null, "%s.ols%d.%d", new Object[] { "v2", Integer.valueOf(100), Integer.valueOf(version) }); }
From source file:Main.java
public static Integer[] intToIntegerArray(int[] array) { Integer[] intBuffer = new Integer[array.length]; for (int i = 0; i < array.length; ++i) { intBuffer[i] = Integer.valueOf(array[i]); }/*from ww w .j a v a 2 s . c o m*/ return intBuffer; }
From source file:Main.java
public static int[] toIntArray(String[] ss) { int[] r = new int[ss.length]; for (int i = 0; i < r.length; i++) { r[i] = Integer.valueOf(ss[i]); }// ww w . ja v a2s . c o m return r; }
From source file:Main.java
public static void putChar(byte[] bb, char ch, int index) { int temp = ch; for (int i = 0; i < 2; i++) { bb[(index + i)] = Integer.valueOf(temp & 0xFF).byteValue(); temp >>= 8;// ww w .jav a 2 s .c o m } }
From source file:Main.java
public final static <GPOutput> boolean isMapComplete(final Map<Integer, GPOutput> map, final int size) { for (int i = 0; i < size; i++) { if (map.get(Integer.valueOf(i)) == null) { return false; }/*from w w w.ja va 2 s . c o m*/ } return true; }