Android Iterable Join join(Iterable iterable)

Here you can find the source of join(Iterable iterable)

Description

join

Declaration

public static <T> String join(Iterable<T> iterable) 

Method Source Code

//package com.java2s;

public class Main {
    public static <T> String join(Iterable<T> iterable) {
        StringBuilder sb = new StringBuilder();
        boolean isFirst = true;
        for (T t : iterable) {
            if (!isFirst) {
                sb.append(",");
                isFirst = false;/*from  www  .j a va2s . co m*/
            }
            sb.append(t.toString());
        }
        return sb.toString();
    }
}

Related

  1. join(Iterable collection)
  2. join(Iterable parts, String delimiter)
  3. join(Iterable strings)
  4. join(Iterable s, CharSequence delimiter)