<commit_before>/*****************************************************************************
 * Copyright (C) The Apache Software Foundation. All rights reserved.        *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Apache Software License *
 * version 1.1, a copy of which has been included  with this distribution in *
 * the LICENSE file.                                                         *
 *****************************************************************************/

package org.apache.mailet;

import java.util.*;

/**
 * This interface define the behaviour of the message "routing" inside
 * the mailet container. The match(Mail) method returns a Collection of
 * recipients that meet this class's criteria.
 * <p>
 * An important feature of the mailet container is the ability to fork
 * processing of messages.  When a message first arrives at the server,
 * it might have multiple recipients specified.  As a message is passed
 * to a matcher, the matcher might only "match" one of the listed
 * recipients.  It would then return only the matching recipient in
 * the Collection.  The mailet container should then duplicate the
 * message splitting the recipient list across the two messages as per
 * what the matcher returned.
 * <p>
 * The matcher can extend this forking to further separation by returning
 * a Collection of Collection objects.  This allows a matcher to fork
 * multiple processes if there are multiple recipients that require
 * separate processing.  For example, we could write a ListservMatcher
 * that handles multiple listservs.  When someone cross-posts across
 * multiple listservs that this matcher handles, it could put each
 * listserv address (recipient) that it handles in a separate Collection
 * object.  By returning each of these Collections within a container
 * Collection object, it could indicate to the mailet container how
 * many forks to spawn.
 * <p>
 * This interface defines methods to initialize a matcher, to match
 * messages, and to remove a matcher from the server. These are known
 * as life-cycle methods and are called in the following sequence:
 * <ol>
 * <li>The matcher is constructed, then initialized with the init method.</li>
 * <li>Any calls from clients to the match method are handled.</li>
 * <li>The matcher is taken out of service, then destroyed with the
 *		destroy method, then garbage collected and finalized.</li><commit_msg>Slight documentation updates (does not support concept of Collection of Collection of MailAddress for recipients... hopefully in the next release).<commit_after>/*****************************************************************************
 * Copyright (C) The Apache Software Foundation. All rights reserved.        *
 * ------------------------------------------------------------------------- *
 * This software is published under the terms of the Apache Software License *
 * version 1.1, a copy of which has been included  with this distribution in *
 * the LICENSE file.                                                         *
 *****************************************************************************/

package org.apache.mailet;

import java.util.*;

/**
 * This interface define the behaviour of the message "routing" inside
 * the mailet container. The match(Mail) method returns a Collection of
 * recipients that meet this class's criteria.
 * <p>
 * An important feature of the mailet container is the ability to fork
 * processing of messages.  When a message first arrives at the server,
 * it might have multiple recipients specified.  As a message is passed
 * to a matcher, the matcher might only "match" one of the listed
 * recipients.  It would then return only the matching recipient in
 * the Collection.  The mailet container should then duplicate the
 * message splitting the recipient list across the two messages as per
 * what the matcher returned.
 * <p>
 * <b>[THIS PARAGRAPH NOT YET IMPLEMENTED]</b>
 * <i>The matcher can extend this forking to further separation by returning
 * a Collection of Collection objects.  This allows a matcher to fork
 * multiple processes if there are multiple recipients that require
 * separate processing.  For example, we could write a ListservMatcher
 * that handles multiple listservs.  When someone cross-posts across
 * multiple listservs that this matcher handles, it could put each
 * listserv address (recipient) that it handles in a separate Collection
 * object.  By returning each of these Collections within a container
 * Collection object, it could indicate to the mailet container how
 * many forks to spawn.</i>
 * <p>
 * This interface defines methods to initialize a matcher, to match
 * messages, and to remove a matcher from the server. These are known
 * as life-cycle methods and are called in the following sequence:
 * <ol>
 * <li>The matcher is constructed, then initialized with the init method.</li>
 * <li>Any calls from clients to the match method are handled.</li>
 * <li>The matcher is taken out of service, then destroyed with the
 *      destroy method, then garbage collected and finalized.</li>
{'fraction_non_alphanumeric': 0.13887821744141376, 'fraction_numerical': 0.000768344218209758, 'mean_word_length': 3.3719563392107474, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4493669', 'n_tokens_mistral': 1156, 'n_tokens_neox': 1126, 'n_words': 651}