Gets and splits data separated by a comma.
@param holder a property holder (not null)
@return a non-null map (key = data name, value = data value, which can be null)
511240
public static Map<String,String> getData( AbstractBlockHolder holder ) {

		BlockProperty p = holder.findPropertyBlockByName( ParsingConstants.PROPERTY_INSTANCE_DATA );
		Map<String,String> result = new HashMap<> ();

		String propertyValue = p == null ? null : p.getValue();
		for( String s : Utils.splitNicely( propertyValue, ParsingConstants.PROPERTY_SEPARATOR )) {
			Map.Entry<String,String> entry = VariableHelpers.parseExportedVariable( s );
			result.put( entry.getKey(), entry.getValue());
		}

		return result;
	}
107117
public Collection<String> split(String value) {
    String[] parts = splitter.split(value);
    Collection<String> values = new ArrayList(parts.length);
    for (int ix = 0; ix < parts.length; ix++)
      values.add(parts[ix]);
    return values;
  }

  public String getSplitOn() {
	return splitter.toString();
  }
}
1240582
@SuppressWarnings("unchecked")
    public static <Item extends IItem> Item getHolderAdapterItem(@Nullable RecyclerView.ViewHolder holder) {
        if (holder != null) {
            Object tag = holder.itemView.getTag(com.mikepenz.fastadapter.R.id.fastadapter_item_adapter);
            if (tag instanceof FastAdapter) {
                FastAdapter fastAdapter = ((FastAdapter) tag);
                int pos = fastAdapter.getHolderAdapterPosition(holder);
                if (pos != RecyclerView.NO_POSITION) {
                    return (Item) fastAdapter.getItem(pos);
                }
            }
        }
        return null;
    }
162241
public static String format( Collection<String> items, String separator ) {

		StringBuilder sb = new StringBuilder();
		for( Iterator<String> it = items.iterator(); it.hasNext(); ) {
			sb.append( it.next());
			if( it.hasNext())
				sb.append( separator );
		}

		return sb.toString();
	}
152748
public static String[] splitLongString(String str, char separator)
    {
        int len = (str == null) ? 0 : str.length();
        if (str == null || len == 0)
        {
            return ArrayUtils.EMPTY_STRING_ARRAY;
        }

        int       oldPos = 0;
        ArrayList list = new ArrayList();
        int pos = str.indexOf(separator);
        while(pos >= 0)
        {
            list.add(substring(str, oldPos, pos));
            oldPos = (pos + 1);
            pos = str.indexOf(separator, oldPos);
        }


        list.add(substring(str, oldPos, len));

        return (String[]) list.toArray(ArrayUtils.EMPTY_STRING_ARRAY);
    }
142829
private String getCommaSeperatedIndexes(Set<String> data) {

        Iterator<String> it = data.iterator();
        String res = it.next();
        if (data.size() == 1) {
            return res;
        }
        res += ", ";
        while (it.hasNext()) {
            res += it.next() + ", ";
        }
        res = res.substring(0, res.length() - 2);
        return res;
    }
662257
public static String joinAsString( Object[] objects, String separator )
    {
        StringBuilder result = new StringBuilder();
        for (int i = 0; i < objects.length; i++)
        {
            Object element = objects[i];
            result.append( String.valueOf( element ) );
            if (i < objects.length - 1) result.append( separator );
        }
        return result.toString();
    }
1115447
private static String join(double[] seriesData, String separator) {

    // two or more elements
    StringBuilder sb = new StringBuilder(256); // Java default is 16, probably too small
    sb.append(seriesData[0]);
    for (int i = 1; i < seriesData.length; i++) {

      if (separator != null) {
        sb.append(separator);
      }

      sb.append(seriesData[i]);
    }
    return sb.toString();
  }
813024
public static List<String> split(String string, String separator)
  {
    final int separatorLength = separator.length();
    final List<String> list = new ArrayList<String>();

    int fromIndex = 0;
    for(;;) {
      int endIndex = string.indexOf(separator, fromIndex);
      if(endIndex == -1) {
        break;
      }
      if(fromIndex < endIndex) {
        list.add(string.substring(fromIndex, endIndex).trim());
      }
      fromIndex = endIndex + separatorLength;
    }
    if(fromIndex < string.length()) {
      list.add(string.substring(fromIndex).trim());
    }
    return list;
  }
538319
public static <K, V> String joinIgnoreNull(Map<K, V> map, String separator, String keyValueSeparator) {
		return join(map, separator, keyValueSeparator, true);
	}
376258
public static Iterable<String> split(String separator, String stringToSplit) {

    String[] StringArray = stringToSplit.split(separator);

    Iterable<String> iterable = Arrays.asList(StringArray);

    return iterable;
  }
753177
public String getDelimited(String[] outTemplate, String separator) {
        StringBuilder b = new StringBuilder(1024);

        for (String var : outTemplate) {
            if (b.length() > 0) {
                b.append(separator);
            }
            b.append(getDataMap().get(var));
        }

        return b.toString();
    }
1193767
public static String[] splitPreserveAllTokens(String value, char separatorChar) {
    if (value == null) {
      return ArrayUtils.EMPTY_STRING_ARRAY;
    }
    int len = value.length();
    if (len == 0) {
      return ArrayUtils.EMPTY_STRING_ARRAY;
    }
    List<String> list = new ArrayList<>();
    int i = 0;
    int start = 0;
    boolean match = false;
    boolean lastMatch = false;
    int escapeStart = -2;
    while (i < len) {
      char c = value.charAt(i);
      if (c == ESCAPE_CHAR) {
        escapeStart = i;
      }
      if (c == separatorChar && escapeStart != i - 1) {
        lastMatch = true;
        list.add(value.substring(start, i));
        match = false;
        start = ++i;
        continue;
      }
      match = true;
      i++;
    }
    if (match || lastMatch) {
      list.add(value.substring(start, i));
    }
    return list.toArray(new String[list.size()]);
  }
1082459
public static List<String> split(String string, String delimiter) {
        return split(string, delimiter, true);
    }
448196
public String join(String separator, final String keyValueSeparator) {
		return MapUtil.join(this.map, separator, keyValueSeparator);
	}
751040
public static Map<String, Object> parseData(String data) {
		Map<String, Object> ret = new HashMap<String, Object>();
		String[] split = data.split("&");
		for (String s : split) {
			int idx = s.indexOf('=');
			try {
				if (idx != -1) {
					ret.put(URLDecoder.decode(s.substring(0, idx), "UTF-8"), URLDecoder.decode(s.substring(idx + 1), "UTF-8"));
				} else {
					ret.put(URLDecoder.decode(s, "UTF-8"), "true");
				}
			} catch (UnsupportedEncodingException e) {
				// Why.
			}
		}
		return ret;
	}
981608
public static ArrayList<String> split(String source, String separator, boolean removeEmpty) {
        if (source == null || source.isEmpty())
            return null;

        ArrayList<String> values = new ArrayList<String>();
        if (separator == null || separator.isEmpty()) {
            values.add(source);
            return values;
        }

        String tmpStr = new String(source);

        int idx = 0;
        String tt;
        while (true) {
            int tmp = tmpStr.indexOf(separator, idx);
            if (tmp == -1) {
                tt = tmpStr.substring(idx);

                if (tt != null && !tt.isEmpty())
                    values.add(tmpStr.substring(idx));

                break;
            }

            tt = tmpStr.substring(idx, tmp);
            if (tt != null && !tt.isEmpty())
                values.add(tmpStr.substring(idx, tmp));

            idx = tmp + separator.length();
        }

        return values;
    }