org.clazzes.util.http
Interface AcceptMatcher


public interface AcceptMatcher

A matcher for items in Accept, Accept-Charset, Accept-Encoding or Accept-Language HTTP headers.


Method Summary
 double matchItem(String accepted, String provided)
          Match a server-provided item against a client-accepted item and return a match quality.
 

Method Detail

matchItem

double matchItem(String accepted,
                 String provided)
Match a server-provided item against a client-accepted item and return a match quality.

Parameters:
accepted - An item as accepted by a client.
provided - An item as accepted by a server.
Returns:
A match quality. 1.0 means a perfect match, 0.0 is returned for non-matching items. Some matchers may return fuzzy matching like for locales.


Copyright © 2013. All Rights Reserved.