@Test public void testEmptyParams() { DownloadMediaOptions.Builder builder = new DownloadMediaOptions.Builder(); assertNotNull(builder.build()); String finalURL = builder.build().toString(); assertEquals("", finalURL); }
@Override public String toString() { StringBuilder builder = new StringBuilder(); boolean firstTime = true; for (String key : mParams.keySet()) { builder.append(firstTime ? "?" : "&"); if (firstTime) firstTime = false; String value = mParams.get(key); builder.append(key).append("=").append(value); } return builder.toString(); }
DownloadMediaOptions { @Override public String toString() { StringBuilder builder = new StringBuilder(); boolean firstTime = true; for (String key : mParams.keySet()) { builder.append(firstTime ? "?" : "&"); if (firstTime) firstTime = false; String value = mParams.get(key); builder.append(key).append("=").append(value); } return builder.toString(); } }
DownloadMediaOptions { @Override public String toString() { StringBuilder builder = new StringBuilder(); boolean firstTime = true; for (String key : mParams.keySet()) { builder.append(firstTime ? "?" : "&"); if (firstTime) firstTime = false; String value = mParams.get(key); builder.append(key).append("=").append(value); } return builder.toString(); } private  DownloadMediaOptions(HashMap<String, String> params); }
DownloadMediaOptions { @Override public String toString() { StringBuilder builder = new StringBuilder(); boolean firstTime = true; for (String key : mParams.keySet()) { builder.append(firstTime ? "?" : "&"); if (firstTime) firstTime = false; String value = mParams.get(key); builder.append(key).append("=").append(value); } return builder.toString(); } private  DownloadMediaOptions(HashMap<String, String> params); @Override String toString(); }
DownloadMediaOptions { @Override public String toString() { StringBuilder builder = new StringBuilder(); boolean firstTime = true; for (String key : mParams.keySet()) { builder.append(firstTime ? "?" : "&"); if (firstTime) firstTime = false; String value = mParams.get(key); builder.append(key).append("=").append(value); } return builder.toString(); } private  DownloadMediaOptions(HashMap<String, String> params); @Override String toString();  }