001/*
002 *                    BioJava development code
003 *
004 * This code may be freely distributed and modified under the
005 * terms of the GNU Lesser General Public Licence.  This should
006 * be distributed with the code.  If you do not have a copy,
007 * see:
008 *
009 *      http://www.gnu.org/copyleft/lesser.html
010 *
011 * Copyright for this code is held jointly by the individual
012 * authors.  These should be listed in @author doc comments.
013 *
014 * For more information on the BioJava project and its aims,
015 * or to join the biojava-l mailing list, visit the home page
016 * at:
017 *
018 *      http://www.biojava.org/
019 *
020 */
021
022package org.biojava.bio.seq;
023
024/**
025 * The interface for filters that can potentialy optimize themselves, and
026 * compare themselves with other filters.
027 *
028 * @author Matthew Pocock
029 * @since 1.2
030 */
031public interface OptimizableFilter extends FeatureFilter {
032  /**
033   * Returns true if this filter is a proper subset of sup - that is, for every
034   * feature that matches this, it also matches sup. The empty filter is a
035   * proper subset of all filters. All filters are a proper subset of the all
036   * filter. All filters are proper subsets of themselves.
037   *
038   * @param sup the potential super set
039   * @return true if sup contains all features contained by this filter
040   */
041  public boolean isProperSubset(FeatureFilter sup);
042  
043  /**
044   * Returns true if this filter is disjoint from filt - that is, there is no
045   * Feature that is accepted by both filters. The empty filter is disjoint from
046   * all other filters. The all filter is disjoint from none.
047   */
048    public boolean isDisjoint(FeatureFilter filt);
049}