001package org.javasimon;
002
003/**
004 * Generic filter useful whenever Simons are filtered for some operation.
005 *
006 * @author <a href="mailto:ivan.mushketyk@gmail.com">Ivan Mushketyk</a>
007 */
008public interface SimonFilter {
009
010        /** Filter accepting all Simons. */
011        SimonFilter ACCEPT_ALL_FILTER = new SimonFilter() {
012                @Override
013                public boolean accept(Simon simon) {
014                        return true;
015                }
016        };
017
018        /**
019         * Checks whether current Simon should be used/considered.
020         *
021         * @param simon Simon to check
022         * @return true if current Simon should be used, false otherwise
023         */
024        boolean accept(Simon simon);
025}