code: private int combineFlags(final Pattern.Flag[] flags) {
          int combined = 0;
          for (Pattern.Flag f : flags) {
              combined |= f.getValue();
          }
          return combined;
      }
docs: Combines a given set of javax.validation.constraints.Pattern.Flag instances into one bitmask suitable for
  java.util.regex.Pattern consumption.
  
  @param flags - list of javax.validation.constraints.Pattern.Flag instances to combine
  @return combined bitmask for regex flags