com.h3c.util

## Class MixedEnumSet

- java.lang.Object
- - com.h3c.util.MixedEnumSet

- All Implemented Interfaces:
    Iterable<Enum<?>>, Collection<Enum<?>>, Set<Enum<?>>

      public class MixedEnumSet
      extends Object
      implements Set<Enum<?>>

  This class implements the `Set` interface and is designed to contain enumeration constants from multiple enumerations.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MixedEnumSet()` Constructs an empty mixed enum set.
    `MixedEnumSet(Collection<? extends Enum<?>> c)` Constructs a new mixed enum set, initialized to the given collection.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `add(Enum<?> anEnum)`
    `boolean` | `addAll(Collection<? extends Enum<?>> c)`
    `void` | `clear()`
    `boolean` | `contains(Object o)`
    `boolean` | `containsAll(Collection<?> c)`
    `boolean` | `equals(Object o)`
    `int` | `hashCode()`
    `boolean` | `isEmpty()`
    `Iterator<Enum<?>>` | `iterator()`
    `boolean` | `remove(Object o)`
    `boolean` | `removeAll(Collection<?> c)`
    `boolean` | `retainAll(Collection<?> c)`
    `int` | `size()`
    `Enum<?>[]` | `toArray()`
    `<T> T[]` | `toArray(T[] a)`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### MixedEnumSet

          public MixedEnumSet()

      Constructs an empty mixed enum set.

    - #### MixedEnumSet

          public MixedEnumSet(Collection<? extends Enum<?>> c)

      Constructs a new mixed enum set, initialized to the given collection.
      Parameters:
        `c` - a collection of enum constants

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals(Object o)

      Specified by:
        `equals` in interface `Collection<Enum<?>>`
      Specified by:
        `equals` in interface `Set<Enum<?>>`
      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Specified by:
        `hashCode` in interface `Collection<Enum<?>>`
      Specified by:
        `hashCode` in interface `Set<Enum<?>>`
      Overrides:
        `hashCode` in class `Object`

    - #### size

          public int size()

      Specified by:
        `size` in interface `Collection<Enum<?>>`
      Specified by:
        `size` in interface `Set<Enum<?>>`

    - #### isEmpty

          public boolean isEmpty()

      Specified by:
        `isEmpty` in interface `Collection<Enum<?>>`
      Specified by:
        `isEmpty` in interface `Set<Enum<?>>`

    - #### contains

          public boolean contains(Object o)

      Specified by:
        `contains` in interface `Collection<Enum<?>>`
      Specified by:
        `contains` in interface `Set<Enum<?>>`

    - #### iterator

          public Iterator<Enum<?>> iterator()

      Specified by:
        `iterator` in interface `Iterable<Enum<?>>`
      Specified by:
        `iterator` in interface `Collection<Enum<?>>`
      Specified by:
        `iterator` in interface `Set<Enum<?>>`

    - #### toArray

          public Enum<?>[] toArray()

      Specified by:
        `toArray` in interface `Collection<Enum<?>>`
      Specified by:
        `toArray` in interface `Set<Enum<?>>`

    - #### toArray

          public <T> T[] toArray(T[] a)

      Specified by:
        `toArray` in interface `Collection<Enum<?>>`
      Specified by:
        `toArray` in interface `Set<Enum<?>>`

    - #### add

          public boolean add(Enum<?> anEnum)

      Specified by:
        `add` in interface `Collection<Enum<?>>`
      Specified by:
        `add` in interface `Set<Enum<?>>`

    - #### remove

          public boolean remove(Object o)

      Specified by:
        `remove` in interface `Collection<Enum<?>>`
      Specified by:
        `remove` in interface `Set<Enum<?>>`

    - #### containsAll

          public boolean containsAll(Collection<?> c)

      Specified by:
        `containsAll` in interface `Collection<Enum<?>>`
      Specified by:
        `containsAll` in interface `Set<Enum<?>>`

    - #### addAll

          public boolean addAll(Collection<? extends Enum<?>> c)

      Specified by:
        `addAll` in interface `Collection<Enum<?>>`
      Specified by:
        `addAll` in interface `Set<Enum<?>>`

    - #### retainAll

          public boolean retainAll(Collection<?> c)

      Specified by:
        `retainAll` in interface `Collection<Enum<?>>`
      Specified by:
        `retainAll` in interface `Set<Enum<?>>`

    - #### removeAll

          public boolean removeAll(Collection<?> c)

      Specified by:
        `removeAll` in interface `Collection<Enum<?>>`
      Specified by:
        `removeAll` in interface `Set<Enum<?>>`

    - #### clear

          public void clear()

      Specified by:
        `clear` in interface `Collection<Enum<?>>`
      Specified by:
        `clear` in interface `Set<Enum<?>>`

Copyright © 2014. All Rights Reserved.