List of usage examples for java.lang String valueOf
public static String valueOf(double d)
From source file:Main.java
public static String upperFirstLetter(String s) { if (isEmpty(s) || !Character.isLowerCase(s.charAt(0))) return s; return String.valueOf((char) (s.charAt(0) - 32)) + s.substring(1); }
From source file:Main.java
public static double kgToLB_ForFatScale2(double paramDouble) { BigDecimal localBigDecimal1 = new BigDecimal(String.valueOf(paramDouble)); BigDecimal localBigDecimal2 = new BigDecimal("1155845"); BigDecimal localBigDecimal3 = new BigDecimal("16"); BigDecimal localBigDecimal4 = new BigDecimal("65536"); BigDecimal localBigDecimal5 = new BigDecimal("2"); return new BigDecimal(String.valueOf(localBigDecimal1.multiply(localBigDecimal2).doubleValue())) .divide(localBigDecimal3, 5, 6).divide(localBigDecimal4, 1, 4).multiply(localBigDecimal5) .doubleValue();/*from w w w. j a va 2 s .c o m*/ }
From source file:Main.java
/** * Returns OS Version * * @return String */ public static String getOsVersionName() { return String.valueOf(Build.VERSION.RELEASE); }
From source file:Main.java
public static String conversionDistanse(int aDistanceMeter) { return (aDistanceMeter >= 1000) ? Math.round((new BigDecimal(String.valueOf(aDistanceMeter / 1000)) .setScale(1, BigDecimal.ROUND_HALF_UP).longValue())) + "km" : aDistanceMeter + "m"; }
From source file:Main.java
protected static String getPackageName(ResolveInfo resolveInfo) { return String.valueOf(resolveInfo.activityInfo.packageName); }
From source file:Main.java
static void Log(int _Msg) { Log.w("Simon says", String.valueOf(_Msg)); }
From source file:Main.java
public static String kgToLB_new(float paramFloat) { return String.valueOf((0xFFFE & 1 + (32768 + 144479 * (int) (paramFloat * 10.0F)) / 65536) / 10.0F); }
From source file:Main.java
public static String getSetterName(String fieldName) { if (fieldName == null || fieldName.length() == 0) return ""; String first = String.valueOf(fieldName.charAt(0)); first = first.toUpperCase();//from w ww . jav a 2s . co m return "set" + first + fieldName.substring(1); }
From source file:Main.java
private static String int2String(int a) { int code = a + ACode; char c = (char) code; return String.valueOf(c); }
From source file:Main.java
public static String getOrdinalFor(int value) { int tenRemainder = value % 10; switch (tenRemainder) { case 1:/*from www .j a v a2s . c om*/ return String.valueOf(value) + "st"; case 2: return String.valueOf(value) + "nd"; case 3: return String.valueOf(value) + "rd"; default: return String.valueOf(value) + "th"; } }