protected static class DefaultResponseFactory.KeyRule extends DefaultResponseFactory.ListRule
Modifier and Type | Field and Description |
---|---|
private java.lang.String[] |
requiredKeys
the keys that must appear in the list
|
Constructor and Description |
---|
KeyRule(int thePriority,
java.lang.Class<? extends Response> theClass,
java.lang.String... keys)
constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(org.w3c.dom.Document doc,
Request request)
test whether the rule matches
|
boolean |
matches(KVMultiList list,
Request request)
test whether the rule matches
|
compareTo, getResponseClass
private java.lang.String[] requiredKeys
public KeyRule(int thePriority, java.lang.Class<? extends Response> theClass, java.lang.String... keys)
thePriority
- the priority. The smaller the number, the
earlier the rule is used.theClass
- the class that shall be instantiatedkeys
- the keyspublic boolean matches(KVMultiList list, Request request)
matches
in class DefaultResponseFactory.ListRule
list
- the listrequest
- the request, may be null
true
if the rule matchespublic boolean matches(org.w3c.dom.Document doc, Request request)
matches
in class DefaultResponseFactory.ListRule
doc
- the documentrequest
- the request, may be null
true
if the rule matchesCopyright © 2005-2013 Knipp Medien und Kommunikation GmbH