Package: java.util

## Interface Set

- - ### Methods Summary

    Methods
    Return type | Name and parameters
    --- | ---
    `Set` | `asImmutable()` A convenience method for creating an immutable list.
    `Set` | `asSynchronized()` A convenience method for creating a synchronized Set.
    `boolean` | `equals(Set other)` Compare the contents of two Sets for equality using Groovy's coercion rules.
    `Set` | `minus(Iterable removeMe)` Create a Set composed of the elements of the first Set minus the elements from the given Iterable.
    `Set` | `minus(Object removeMe)` Create a Set composed of the elements of the first Set minus the given element.
    `Set` | `minus(Collection removeMe)` Create a Set composed of the elements of the first Set minus the elements of the given Collection.

  - #### Methods inherited from interface java.util.Collection

    `addAll`, `asBoolean`, `asImmutable`, `asSynchronized`, `asType`, `collect`, `collect`, `collect`, `collectAll`, `collectAll`, `collectNested`, `containsAll`, `disjoint`, `eachPermutation`, `find`, `find`, `findAll`, `findAll`, `findResult`, `findResult`, `flatten`, `flatten`, `getAt`, `grep`, `grep`, `groupBy`, `inject`, `inject`, `intersect`, `isCase`, `leftShift`, `multiply`, `plus`, `plus`, `plus`, `removeAll`, `removeAll`, `retainAll`, `retainAll`, `sort`, `split`, `toList`, `toListString`, `toListString`, `toSet`, `unique`, `unique`, `unique`, `unique`, `unique`, `unique`

  - #### Methods inherited from interface java.lang.Iterable

    `any`, `asList`, `collectEntries`, `collectEntries`, `collectEntries`, `collectEntries`, `collectMany`, `collectMany`, `collectNested`, `collectNested`, `combinations`, `combinations`, `count`, `count`, `countBy`, `drop`, `dropWhile`, `each`, `eachCombination`, `eachWithIndex`, `every`, `findResults`, `first`, `flatten`, `flatten`, `getAt`, `groupBy`, `groupBy`, `groupBy`, `join`, `last`, `max`, `max`, `max`, `min`, `min`, `min`, `sort`, `sort`, `sort`, `sort`, `sort`, `sum`, `sum`, `sum`, `sum`, `take`, `takeWhile`, `toList`

- - ### Methods Detail

    - #### public Set asImmutable()

      A convenience method for creating an immutable list.

      Returns:
        an immutable Set
      Since:
        1.0
      See Also:
        Collections#unmodifiableSet(java.util.Set)

    - #### public Set asSynchronized()

      A convenience method for creating a synchronized Set.

      Returns:
        a synchronized Set
      Since:
        1.0
      See Also:
        Collections#synchronizedSet(java.util.Set)

    - #### public boolean equals(Set other)

      Compare the contents of two Sets for equality using Groovy's coercion rules.

      Returns `true` if the two sets have the same size, and every member of the specified set is contained in this set (or equivalently, every member of this set is contained in the specified set). If numbers exist in the sets, then they are compared as numbers, for example 2 == 2L. If both sets are `null`, the result is true; otherwise if either set is `null`, the result is `false`. Example usage:

          Set s1 = ["a", 2]
          def s2 = [2, 'a'] as Set
          Set s3 = [3, 'a']
          def s4 = [2.0, 'a'] as Set
          def s5 = [2L, 'a'] as Set
          assert s1.equals(s2)
          assert !s1.equals(s3)
          assert s1.equals(s4)
          assert s1.equals(s5)

      Parameters:
        `other` - the Set being compared to
      Returns:
        `true` if the contents of both sets are identical
      Since:
        1.8.0

    - #### public Set minus(Iterable removeMe)

      Create a Set composed of the elements of the first Set minus the elements from the given Iterable.

      Parameters:
        `removeMe` - the items to remove from the Set
      Returns:
        the resulting Set
      Since:
        1.8.7

    - #### public Set minus(Object removeMe)

      Create a Set composed of the elements of the first Set minus the given element.

      Parameters:
        `removeMe` - the element to remove from the Set
      Returns:
        the resulting Set
      Since:
        1.5.0

    - #### public Set minus(Collection removeMe)

      Create a Set composed of the elements of the first Set minus the elements of the given Collection.

      Parameters:
        `removeMe` - the items to remove from the Set
      Returns:
        the resulting Set
      Since:
        1.5.0