plusElement method

  1. @useResult
KtSet<T> plusElement(
  1. T element
)

Returns a set containing all elements of the original collection and then the given element.

Implementation

@useResult
KtSet<T> plusElement(T element) {
  final result = KtMutableSet<T>.of();
  result.addAll(asIterable());
  result.add(element);
  return result;
}