Movatterモバイル変換


[0]ホーム

URL:


menu
  1. Dart
  2. dart:core
  3. Set<E>
  4. union abstract method
union
description

union abstract method

Set<E>union(
  1. Set<E>other
)

Creates a new set which contains all the elements of this set andother.

That is, the returned set contains all the elements of thisSet andall the elements ofother.

final characters1 = <String>{'A', 'B', 'C'};final characters2 = <String>{'A', 'E', 'F'};final unionSet1 = characters1.union(characters2);print(unionSet1); // {A, B, C, E, F}final unionSet2 = characters2.union(characters1);print(unionSet2); // {A, E, F, B, C}

Implementation

Set<E> union(Set<E> other);
  1. Dart
  2. dart:core
  3. Set<E>
  4. union abstract method
Set class

[8]ページ先頭

©2009-2025 Movatter.jp