Skip to content

Commit 6e507af

Browse files
NunuMhiranya911
authored andcommitted
Change addAllTokens argument data type from List to Collection (fireb… (#281)
* Change addAllTokens argument data type from List to Collection (#280) * Fix Javadoc comment to reflect method argument type
1 parent 6497577 commit 6e507af

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/main/java/com/google/firebase/messaging/MulticastMessage.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
import com.google.common.collect.ImmutableList;
2323
import com.google.common.collect.ImmutableMap;
2424
import com.google.firebase.internal.NonNull;
25+
26+
import java.util.Collection;
2527
import java.util.HashMap;
2628
import java.util.List;
2729
import java.util.Map;
@@ -113,13 +115,13 @@ public Builder addToken(@NonNull String token) {
113115
}
114116

115117
/**
116-
* Adds a list of tokens to which the message should be sent. Up to 100 tokens can be
118+
* Adds a collection of tokens to which the message should be sent. Up to 100 tokens can be
117119
* specified on a single instance of {@link MulticastMessage}.
118120
*
119-
* @param tokens List of Firebase device registration tokens.
121+
* @param tokens Collection of Firebase device registration tokens.
120122
* @return This builder.
121123
*/
122-
public Builder addAllTokens(@NonNull List<String> tokens) {
124+
public Builder addAllTokens(@NonNull Collection<String> tokens) {
123125
this.tokens.addAll(tokens);
124126
return this;
125127
}

0 commit comments

Comments
 (0)