code: public static PreserveAttributes fromMnemonicString(String s) {
  
      if (Strings.isNullOrEmpty(s)) {
        return new PreserveAttributes(0);
      }
  
      s = s.toLowerCase();
  
      Preconditions.checkArgument(ATTRIBUTES_REGEXP.matcher(s).matches(), "Invalid %s string %s, must be of the form %s.",
          PreserveAttributes.class.getSimpleName(), s, ATTRIBUTES_REGEXP.pattern());
  
      int value = 0;
      for (Option option : Option.values()) {
        if (s.indexOf(option.token) >= 0) {
          value |= 1 << option.ordinal();
        }
      }
      return new PreserveAttributes(value);
    }
docs: Parse {@link PreserveAttributes} from a string of the form \[rbugp]*\:
  * r -> preserve replication
  * b -> preserve block size
  * u -> preserve owner
  * g -> preserve group
  * p -> preserve permissions
  * v -> preserve version
  Characters not in this character set will be ignored.
  
  @param s String of the form \[rbugpv]*\
  @return Parsed {@link PreserveAttributes}