Add IQ.isResponseIQ()

This commit is contained in:
Florian Schmaus 2019-04-08 23:04:25 +02:00
parent 7d5274dad1
commit 87e0ac9ba1
1 changed files with 10 additions and 0 deletions

View File

@ -105,6 +105,16 @@ public abstract class IQ extends Stanza {
}
}
/**
* Return true if this IQ is a request, i.e. an IQ of type {@link Type#result} or {@link Type#error}.
*
* @return true if IQ type is 'result' or 'error', false otherwise.
* @since 4.4
*/
public boolean isResponseIQ() {
return !isRequestIQ();
}
public final String getChildElementName() {
return childElementName;
}