public static OAuthScope[] fromValues(String... values) { if (values == null || values.length == 0) { return new OAuthScope[0]; } final OAuthScope[] result = new OAuthScope[values.length]; int i = 0; for (String value : values) { result[i++] = fromValue(value); } return result; } }
public static OAuthScope fromValue(String value) { for (OAuthScope scope : values()) { if (scope.value.equals(value)) { return scope; } } throw new IllegalArgumentException(value); }
int i = 0; for (OAuthScope scope : scopes) { builder.append(scope.getValue()); if (++i < nScopes) { builder.append("%20");