public class AndMatcher extends AbstractMatcherContainer
AND
across all the contained
matchers.IHeaderMatcher.Builder
Constructor and Description |
---|
AndMatcher(Collection<? extends IHeaderMatcher> enclosed,
String resource)
Constructs the AndMatcher with the a unique random id and the enclosed
collection.
|
AndMatcher(String id,
Collection<? extends IHeaderMatcher> enclosed,
String resource)
Constructs the AndMatcher with the specified id and enclosed collection.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(IHeaders headers)
Attempts to match text in the IHeaders instance.
|
getEnclosed, getResource, reset
getId, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescription
public AndMatcher(String id, Collection<? extends IHeaderMatcher> enclosed, String resource)
id
- the to use. If null or an empty string a unique random id will be
created.enclosed
- the enclosed collection.resource
- the name of the resource the collection was read from if any. may be null.public AndMatcher(Collection<? extends IHeaderMatcher> enclosed, String resource)
enclosed
- the enclosed collection.resource
- the name of the resource the collection was read from if any. may be null.public boolean matches(IHeaders headers)
IHeaderMatcher
headers
- the representations of the headers to checktrue
if the matcher matches the text, false
otherwise.Copyright © 2006–2024 Apache Software Foundation. All rights reserved.