Example usage for java.lang String valueOf

List of usage examples for java.lang String valueOf

Introduction

In this page you can find the example usage for java.lang String valueOf.

Prototype

public static String valueOf(double d) 

Source Link

Document

Returns the string representation of the double argument.

Usage

From source file:Main.java

public static String deleteUserDeleteUrl(long userId) {
    return KILLERBONE_FULL_URL + "user/" + String.valueOf(userId);
}

From source file:com.cubeia.backoffice.report.RequestBean.java

@SuppressWarnings("rawtypes")
public static RequestBean parse(String name, Map params, String format) {
    Map<String, String> map = checkParameters(params);
    Format f = Format.valueOf(format.toUpperCase());
    if (f == null)
        throw new IllegalArgumentException("Unknown format: " + format);
    return new RequestBean(name, map, f);
}

From source file:Main.java

public static String getFriendships(long userId) {
    return KILLERBONE_FULL_URL + "friendships/" + String.valueOf(userId);
}

From source file:Main.java

public static String getZeroPaddedNum(int num) {
    String str;/*from  w ww.j a  va2  s.c om*/

    if (num < 10 && num >= 0) {
        str = "0" + num;
    } else {
        str = String.valueOf(num);
    }

    return str;
}

From source file:Main.java

public static String generateConnectKey(String host, int port) {
    StringBuilder sb = new StringBuilder();
    sb.append(host);/*from ww  w  .j  av  a 2 s  .  c  o m*/
    sb.append(":");
    sb.append(String.valueOf(port));
    return sb.toString();
}

From source file:Main.java

public static String getNewEventsUrl(long timestamp) {
    return KILLERBONE_FULL_URL + "events/new/" + String.valueOf(timestamp);
}

From source file:Main.java

static Date createDate(int _Year, int _Month, int _Day) {
    String date = String.valueOf(_Year) + "-" + String.valueOf(_Month) + "-" + String.valueOf(_Day);
    return toDate(date);
}

From source file:Main.java

public static String getTimestamp() {
    Calendar cal = Calendar.getInstance();
    long timestamp = cal.getTimeInMillis() / 1000;
    return String.valueOf(timestamp);
}

From source file:Main.java

public static String decodeBASE64(String key) throws Exception {
    byte[] data = Base64.decode(key.getBytes(), Base64.DEFAULT);
    String str = String.valueOf(data);
    return str;/*from   ww w .  jav a 2 s.co m*/
}

From source file:Main.java

public static String encodeBASE64(String key) throws Exception {
    byte[] data = Base64.encode(key.getBytes(), Base64.DEFAULT);
    String str = String.valueOf(data);
    return str;// new String(Base64.encode(key.getBytes(),
               // Base64.DEFAULT),"UTF-8");
}