判断两个","逗号相隔的字符串中的单词是否完全等同.

@param first
a {@link java.lang.String} object.
@param second
a {@link java.lang.String} object.
@param delimiter
a {@link java.lang.String} object.
@return a boolean.
500501
public static boolean isEqualSeq(final String first, final String second, final String delimiter) {
    if (isNotEmpty(first) && isNotEmpty(second)) {
      String[] firstWords = split(first, delimiter);
      Set<String> firstSet = CollectUtils.newHashSet();
      for (int i = 0; i < firstWords.length; i++) {
        firstSet.add(firstWords[i]);
      }
      String[] secondWords = split(second, delimiter);
      Set<String> secondSet = CollectUtils.newHashSet();
      for (int i = 0; i < secondWords.length; i++) {
        secondSet.add(secondWords[i]);
      }
      return firstSet.equals(secondSet);
    } else {
      return isEmpty(first) & isEmpty(second);
    }
  }
747035
public int compare(final T first, final T second) {
    if (first.equals(second)) return 0;
    else return first.size() - second.size();
  }
23558
public List<Double> getDoubles(String name, String delimiter) {
        List<String> strings = getStrings(name, delimiter);

        List<Double> doubles = new ArrayList<>(strings.size());
        for (String value : strings) {
            try {
                double i = Double.parseDouble(value);
                doubles.add(i);
            } catch (NumberFormatException e) {
            }
        }
        return Collections.unmodifiableList(doubles);
    }
886189
public String nextTo(char delimiter) throws JSONException {
		StringBuilder sb = new StringBuilder();
		for (;;) {
			char c = this.next();
			if (c == delimiter || c == 0 || c == '\n' || c == '\r') {
				if (c != 0) {
					this.back();
				}
				return sb.toString().trim();
			}
			sb.append(c);
		}
	}
295680
public static String mergeSeq(final String first, final String second) {
    return mergeSeq(first, second, DELIMITER);
  }
1056689
private boolean hasDelimiter(String word, String[] delimiters) {

        boolean delim = false;
        for (int i = 0; i < delimiters.length; i++) {
            if (word.indexOf(delimiters[i]) > -1) {
                delim = true;
                break;
            }
        }
        return delim;
    }
1282223
public static String join(List<?> things, String delim) {
        StringBuilder builder = new StringBuilder();
        boolean first = true;
        for (Object thing : things) {
            if (first) {
                first = false;
            } else {
                builder.append(delim);
            }
            builder.append(thing.toString());
        }
        return builder.toString();
    }
405580
public int countDifferencesBetweenAnd(String first, String second) {
        if (first == null) {
            if (second == null) {
                return 0;
            } else {
                first = "";
            }
        } else if (second == null) {
            second = "";
        }
        LinkedList<DiffMatchPatch.Diff> diffs = getDiffs(first, second);
        int diffCount = 0;
        for (DiffMatchPatch.Diff diff : diffs) {
            if (diff.operation != DiffMatchPatch.Operation.EQUAL) {
                diffCount++;
            }
        }
        return diffCount;
    }
174536
public static String join(final String delimiter, final Collection<?> elements)
	{
		if (elements == null || elements.isEmpty())
		{
			return "";
		}
		return join(delimiter, elements.toArray(new Object[elements.size()]));
	}
574210
public String differenceBetweenAnd(String first, String second) {
        Formatter whitespaceFormatter = new Formatter() {
            @Override
            public String format(String value) {
                return ensureWhitespaceVisible(value);
            }
        };
        return getDifferencesHtml(first, second, whitespaceFormatter);
    }
1148692
public List<String> getStrings(String name, String delimiter) {
        String value = getString(name, null);
        if (StringUtils.isNullOrEmpty(value)) {
            return Collections.emptyList();
        }

        value = value.trim();
        // to handles cases where value is specified like [a,b, c]
        if (value.startsWith("[") && value.endsWith("]")) {
            value = value.substring(1, value.length() - 1);
        }
        return StringUtils.getList(value, delimiter);
    }
1129119
public static Mapper concat(final Mapper first, final Mapper second){
        return new ConcatMapper(new Mapper[]{first,second});
    }
912891
public static String joinP(String delimiter, int... values) {
        StringBuilder builder = new StringBuilder(values.length + (delimiter.length() * values.length));
        boolean first = true;
        for (int i : values) {
            if (first) {
                first = false;
            } else {
                builder.append(delimiter);
            }
            builder.append(Integer.toString(i));
        }
        return builder.toString();
    }
295374
public void setDelimiter(final String delimiter) {
        String prefix = "";
        //escape the "pipe" character used in regular expression of String.split method
        if ("|".equals(delimiter)) {
            prefix = "\\";
        }
        this.delimiter = prefix + delimiter;
    }
141504
public static <T> Predicate<T> and(Predicate<T> first, Predicate<T> second) {
        dbc.precondition(first != null, "first predicate is null");
        dbc.precondition(second != null, "second predicate is null");
        return Logic.Unary.and(Iterations.iterable(first, second));
    }
913401
function splitOnFirst(str, splitter, callback) {
        var parts = str.split(splitter);
        var first = parts.shift();
        return callback(first, parts.join(splitter));
    }
103320
private static String[] differences(String[] first, String[] second) {

        String[] sortedFirst = Arrays.copyOf(first, first.length); // O(n)
        String[] sortedSecond = Arrays.copyOf(second, second.length); // O(m)
        Arrays.sort(sortedFirst); // O(n log n)
        Arrays.sort(sortedSecond); // O(m log m)

        int firstIndex = 0;
        int secondIndex = 0;

        LinkedList<String> diffs = new LinkedList<>();

        while (firstIndex < sortedFirst.length && secondIndex < sortedSecond.length) {
            int compare = (int) Math.signum(sortedFirst[firstIndex].compareTo(sortedSecond[secondIndex]));

            switch (compare) {
                case -1:
                    diffs.add(sortedFirst[firstIndex]);
                    firstIndex++;
                    break;
                case 1:
                    diffs.add(sortedSecond[secondIndex]);
                    secondIndex++;
                    break;
                default:
                    firstIndex++;
                    secondIndex++;
            }
        }

        String[] strDups = new String[diffs.size()];

        return diffs.toArray(strDups);
    }