code: public static <E extends Enum<E>> long generateBitVector(final Class<E> enumClass, final Iterable<? extends E> values) {
          checkBitVectorable(enumClass);
          Validate.notNull(values);
          long total = 0;
          for (final E constant : values) {
              Validate.isTrue(constant != null, NULL_ELEMENTS_NOT_PERMITTED);
              total |= 1L << constant.ordinal();
          }
          return total;
      }
docs: <p>Creates a long bit vector representation of the given subset of an Enum.</p>
  
  <p>This generates a value that is usable by {@link EnumUtils#processBitVector}.</p>
  
  <p>Do not use this method if you have more than 64 values in your Enum, as this
  would create a value greater than a long can hold.</p>
  
  @param enumClass the class of the enum we are working with, not {@code null}
  @param values    the values we want to convert, not {@code null}, neither containing {@code null}
  @param <E>       the type of the enumeration
  @return a long whose value provides a binary representation of the given set of enum values.
  @throws NullPointerException if {@code enumClass} or {@code values} is {@code null}
  @throws IllegalArgumentException if {@code enumClass} is not an enum class or has more than 64 values,
  or if any {@code values} {@code null}
  @since 3.0.1
  @see #generateBitVectors(Class, Iterable)