code: public static <E extends Enum<E> & ByteEnum> int setToInt (Set<E> set)
      {
          int flags = 0;
          for (E value : set) {
              flags |= toIntFlag(value);
          }
          return flags;
      }
docs: Convert a Set of ByteEnums into an integer compactly representing the elements that are
  included.