package eu.eudat.utilities.helpers; import java.util.List; /** * Created by ikalyvas on 12/19/2017. */ public class LabelBuilder { private static String generateLabel(List items){ String label=""; for(T item : items){ if(items.indexOf(item)==3){ label+="..."; break; } if(items.indexOf(item)>1){ label+=", "; } label+=item.generateLabel(); } return label; } public static String getLabel(List items){ return generateLabel(items); } }