@Test public void testMatcherNoHeader() { Header header = new Header(1); assertFalse(header.isHeaderMatching(HttpHeaders.CONTENT_TYPE, BatchParserCommon.PATTERN_MULTIPART_MIXED)); }
public boolean isHeaderMatching(final String name, final Pattern pattern) { if (getHeaders(name).size() != 1) { return false; } else { return pattern.matcher(getHeaders(name).get(0)).matches(); } }
Header implements Cloneable { public boolean isHeaderMatching(final String name, final Pattern pattern) { if (getHeaders(name).size() != 1) { return false; } else { return pattern.matcher(getHeaders(name).get(0)).matches(); } } }
Header implements Cloneable { public boolean isHeaderMatching(final String name, final Pattern pattern) { if (getHeaders(name).size() != 1) { return false; } else { return pattern.matcher(getHeaders(name).get(0)).matches(); } } Header(final int lineNumer); }
Header implements Cloneable { public boolean isHeaderMatching(final String name, final Pattern pattern) { if (getHeaders(name).size() != 1) { return false; } else { return pattern.matcher(getHeaders(name).get(0)).matches(); } } Header(final int lineNumer); void addHeader(final String name, final String value, final int lineNumber); void addHeader(final String name, final List<String> values, final int lineNumber); boolean isHeaderMatching(final String name, final Pattern pattern); void removeHeader(final String name); String getHeader(final String name); String getHeaderNotNull(final String name); List<String> getHeaders(final String name); HeaderField getHeaderField(final String name); int getLineNumber(); Map<String, String> toSingleMap(); Map<String, List<String>> toMultiMap(); @Override Header clone(); static List<String> splitValuesByComma(final String headerValue); }
Header implements Cloneable { public boolean isHeaderMatching(final String name, final Pattern pattern) { if (getHeaders(name).size() != 1) { return false; } else { return pattern.matcher(getHeaders(name).get(0)).matches(); } } Header(final int lineNumer); void addHeader(final String name, final String value, final int lineNumber); void addHeader(final String name, final List<String> values, final int lineNumber); boolean isHeaderMatching(final String name, final Pattern pattern); void removeHeader(final String name); String getHeader(final String name); String getHeaderNotNull(final String name); List<String> getHeaders(final String name); HeaderField getHeaderField(final String name); int getLineNumber(); Map<String, String> toSingleMap(); Map<String, List<String>> toMultiMap(); @Override Header clone(); static List<String> splitValuesByComma(final String headerValue);  }