1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-06-17 00:44:50 +02:00

Add "rule of thumb" to StanzaFilter javadoc

This commit is contained in:
Florian Schmaus 2018-08-25 12:55:51 +02:00
parent 24267c532d
commit c0b1fee700

View file

@ -41,6 +41,11 @@ import org.jivesoftware.smack.packet.Stanza;
* // Create a new stanza collector using the filter we created.
* StanzaCollector myCollector = connection.createStanzaCollector(myFilter);
* </pre>
* <p>
* As a rule of thumb: If you have a predicate method, that is, a method which takes a single Stanza as argument, is pure
* (side effect free) and returns only a boolean, then it is a good indicator that the logic should be put into a
* {@link StanzaFilter} (and be referenced in {@link org.jivesoftware.smack.StanzaListener}).
* </p>
*
* @see org.jivesoftware.smack.StanzaCollector
* @see org.jivesoftware.smack.StanzaListener