In the App Engine documentation, an ellipsis (JID...) is encountered in a method signature like:
public MessageBuilder withRecipientJids(JID... recipientJids)
This notation represents Java varargs (variable arguments). It allows for passing any quantity of objects of a specified type, in this case JIDs.
For example, the following method calls are valid:
MessageBuilder msgBuilder; //Constructor call omitted for simplicity MessageBuilder msgBuilder2; msgBuilder.withRecipientJids(jid1, jid2); msgBuilder2.withRecipientJids(jid1, jid2, jid78_a, someOtherJid);
These calls pass two and four JIDs to the method, respectively.
Java varargs provide a convenient way to work with an arbitrary number of arguments, allowing for flexibility and ease of use in method calls.
The above is the detailed content of What Does the Ellipsis (...) Mean in App Engine Method Signatures?. For more information, please follow other related articles on the PHP Chinese website!