List of usage examples for java.lang String valueOf
public static String valueOf(double d)
From source file:Main.java
public static String getSdkVersion() { return String.valueOf(Build.VERSION.SDK_INT); }
From source file:Main.java
private static String getType(int pTime) { return (pTime < 10 ? "0" + pTime : String.valueOf(pTime)); }
From source file:Main.java
public static String getCurrentTime10() { return String.valueOf(new Date().getTime() / 1000); }
From source file:Main.java
private static String buildTransaction(final String type) { return (type == null) ? String.valueOf(System.currentTimeMillis()) : type + System.currentTimeMillis(); }
From source file:Main.java
public static String pad(long number) { if (number >= 10) { return String.valueOf(number); } else {/*from w w w . j a va2 s . com*/ return "0" + String.valueOf(number); } }
From source file:Main.java
public static String getDuration(String durationInSeconds) { String minutes = String.valueOf(Integer.parseInt(durationInSeconds) / 60); int sec = Integer.parseInt(durationInSeconds) % 60; String seconds = String.valueOf(Integer.parseInt(durationInSeconds) % 60); if (sec < 10) seconds = "0" + seconds; return minutes + ":" + seconds; }
From source file:Main.java
public static String format(int value) { if (value >= 10) { return String.valueOf(value); } else {//from w w w . j a v a 2s .c o m return "0" + value; } }
From source file:Main.java
public static String obj2Str(Object obj) { if (obj != null) { return String.valueOf(obj); } else {/* w w w .j a v a2 s .c om*/ return null; } }
From source file:Main.java
public static String getMilitaryTimeString(int hr, int min) { String hrStr = String.valueOf(hr); String minStr = String.valueOf(min); String timeStr = String.valueOf(hr) + ":"; if (minStr.length() == 1) { minStr = "0" + minStr; }//from w ww . ja v a 2 s.co m timeStr += minStr; return timeStr; }
From source file:Main.java
public static String lbToKg_new(float paramFloat) { return String.valueOf(new BigDecimal((float) (0.45359D * paramFloat)).setScale(1, 4).floatValue()); }