tigase.jaxmpp.core.client.criteria
Class Or
java.lang.Object
tigase.jaxmpp.core.client.criteria.Or
- All Implemented Interfaces:
- Criteria
public class Or
- extends Object
- implements Criteria
Criteria implementation to realize OR operator.
- Author:
- bmalkow
|
Method Summary |
Criteria |
add(Criteria criteria)
Adds restriction for deeper level of elements. |
boolean |
match(Element element)
This method checks if element match to conditions. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
crits
protected Criteria[] crits
Or
public Or(Criteria... criterias)
add
public Criteria add(Criteria criteria)
- Adds restriction for deeper level of elements.
For example:
If you have structure of elements:
<A><B></B></A>
then, to check elements A and B you should use
construction like this: critToCheckA.add(critToCheckB);
- Specified by:
add in interface Criteria
- Parameters:
criteria - restriction to add
- Returns:
match
public boolean match(Element element)
throws XMLException
- This method checks if element match to conditions.
- Specified by:
match in interface Criteria
- Parameters:
element - element to check
- Returns:
true if element match.
- Throws:
XMLException
Copyright © 2006-2012 Tigase. All Rights Reserved.