Java Iterable createDelimitedString(Iterable iterable, String delimiter)

Here you can find the source of createDelimitedString(Iterable iterable, String delimiter)

Description

create Delimited String

License

Open Source License

Declaration

public static String createDelimitedString(Iterable iterable, String delimiter) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.Iterator;

public class Main {
    public static String createDelimitedString(Iterable iterable, String delimiter) {
        Iterator iter = iterable.iterator();
        String string = "";
        while (iter.hasNext()) {
            string += iter.next();/*from w w w  .  j  av  a 2s. com*/
            if (iter.hasNext())
                string += delimiter;
        }
        return string;

    }
}

Related

  1. appendTo(StringBuilder appendable, Iterable parts, CharSequence separator)
  2. commafy(Iterable col, StringBuilder builder)
  3. containsSame(Iterable coll, Object obj)
  4. convertIterable(final Iterable> iterables)
  5. createUpdateTemplate(String table, Iterable columns)
  6. equal(Iterable it1, Iterable it2)
  7. equalsIterablesInOrder(Iterable i1, Iterable i2)
  8. fillFromIterable(C c, Iterable i)