1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-21 22:02:06 +01: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