Java Collection Dump dumpList(StringBuffer sb, Collection slist)

Here you can find the source of dumpList(StringBuffer sb, Collection slist)

Description

dump List

License

Open Source License

Declaration

public static <T> void dumpList(StringBuffer sb, Collection<T> slist) 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2006-2010 eBay Inc. All Rights Reserved.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *******************************************************************************/

import java.util.Collection;

public class Main {
    public static <T> void dumpList(StringBuffer sb, Collection<T> slist) {
        boolean first = true;
        for (T s : slist) {
            if (!first) {
                sb.append(",");
            }/*from w ww. j  a  v  a  2s.  com*/
            sb.append(s);
            first = false;
        }
    }
}

Related

  1. dumpCollection(Collection collection)
  2. dumpCollection(Object[] c, StringBuilder sb, int indent)
  3. dumpCollection(String msg, Collection c)
  4. dumpCollectionCollection(Collection c)
  5. dumpList(Collection list)
  6. dumpToString(Collection c, String separator)