src/main/java/net/systran/platform/translation/client/ApiClient.java
/**
   * Format the given parameter object into string.
   */
Format the given parameter object into string.
Format the given parameter object into string .
public Object parameterToString(Object param) {
    if (param == null) {
      return "";
    } else if (param instanceof Date) {
      return formatDate((Date) param);
    } else if (param instanceof Collection) {
      StringBuilder b = new StringBuilder();
      for(Object o : (Collection)param) {
        if (o instanceof String) {
          Collection<String> pa = (Collection)param;
          return pa.toArray(new String[pa.size()]);
        }
        if(b.length() > 0) {
          b.append(",");
        }
        b.append(String.valueOf(o));
      }
      return b.toString();
    } else {
      return String.valueOf(param);
    }
  }
public Object parameterToString ( Object param ) { if ( param == null ) { return "" ; } else if ( param instanceof Date ) { return formatDate ( ( Date ) param ) ; } else if ( param instanceof Collection ) { StringBuilder b = new StringBuilder ( ) ; for ( Object o : ( Collection ) param ) { if ( o instanceof String ) { Collection < String > pa = ( Collection ) param ; return pa . toArray ( new String [ pa . size ( ) ] ) ; } if ( b . length ( ) > 0 ) { b . append ( "," ) ; } b . append ( String . valueOf ( o ) ) ; } return b . toString ( ) ; } else { return String . valueOf ( param ) ; } }
Format the given parameter object into string.
Format the given parameter object into string .