code: final void typeCheck(E e) {
          Class<?> eClass = e.getClass();
          if (eClass != elementType && eClass.getSuperclass() != elementType)
              throw new ClassCastException(eClass + " != " + elementType);
      }
docs: Throws an exception if e is not of the correct type for this enum set.