/** Add a collection of tags to the set. */ ArrayTagSet addAll(Tag[] ts, int tsLength) { if (tsLength == 0) { return this; } else if (length == 0) { Arrays.sort(ts, 0, tsLength, TAG_COMPARATOR); int len = dedup(ts, 0, ts, 0, tsLength); return new ArrayTagSet(toStringArray(ts, len)); } else { String[] newTags = new String[(length + tsLength) * 2]; Arrays.sort(ts, 0, tsLength, TAG_COMPARATOR); int newLength = merge(newTags, tags, length, ts, tsLength); return new ArrayTagSet(newTags, newLength); } }
/** Add a collection of tags to the set. */ ArrayTagSet addAll(Tag[] ts, int tsLength) { if (tsLength == 0) { return this; } else if (length == 0) { Arrays.sort(ts, 0, tsLength, TAG_COMPARATOR); int len = dedup(ts, 0, ts, 0, tsLength); return new ArrayTagSet(toStringArray(ts, len)); } else { String[] newTags = new String[(length + tsLength) * 2]; Arrays.sort(ts, 0, tsLength, TAG_COMPARATOR); int newLength = merge(newTags, tags, length, ts, tsLength); return new ArrayTagSet(newTags, newLength); } }
i += lengthA - ai; } else if (bi < lengthB) { i = dedup(srcB, bi, dst, i, lengthB - bi);
i += lengthA - ai; } else if (bi < lengthB) { i = dedup(srcB, bi, dst, i, lengthB - bi);