code: private static int encode(Weekday... weekdays) {
  
      int bitmask = 0;
      for (Weekday weekday : weekdays) {
        bitmask = bitmask | (1 << weekday.ordinal());
      }
      return bitmask;
    }
docs: This method encodes the given {@code set} to a bit-mask for {@link #getValue()}.
  
  @param weekdays are the {@link Weekday}s.
  @return the encoded {@link #getValue() value}.