Replace var-args with single parameter.

This commit is contained in:
Joel Leitch 2011-04-11 18:09:59 +00:00
parent 6b55f071ba
commit 457b37f08e

View File

@ -360,12 +360,12 @@ public final class GsonBuilder {
* This means that if one of the {@code strategies} suggests that a field (or class) should be * This means that if one of the {@code strategies} suggests that a field (or class) should be
* skipped then that field (or object) is skipped during serialization. * skipped then that field (or object) is skipped during serialization.
* *
* @param strategies the set of strategy objects to apply during serialization. * @param strategy an exclusion strategy to apply during serialization.
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
* @since 1.7 * @since 1.7
*/ */
public GsonBuilder addSerializationExclusionStrategies(ExclusionStrategy... strategies) { public GsonBuilder addSerializationExclusionStrategies(ExclusionStrategy strategy) {
serializeExclusionStrategies.addAll(Arrays.asList(strategies)); serializeExclusionStrategies.add(strategy);
return this; return this;
} }
@ -375,12 +375,12 @@ public final class GsonBuilder {
* This means that if one of the {@code strategies} suggests that a field (or class) should be * This means that if one of the {@code strategies} suggests that a field (or class) should be
* skipped then that field (or object) is skipped during deserialization. * skipped then that field (or object) is skipped during deserialization.
* *
* @param strategies the set of strategy object to apply during deserialization. * @param strategy an exclusion strategy to apply during deserialization.
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern * @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
* @since 1.7 * @since 1.7
*/ */
public GsonBuilder addDeserializationExclusionStrategies(ExclusionStrategy... strategies) { public GsonBuilder addDeserializationExclusionStrategies(ExclusionStrategy strategy) {
deserializeExclusionStrategies.addAll(Arrays.asList(strategies)); deserializeExclusionStrategies.add(strategy);
return this; return this;
} }
/** /**