001    package org.hackystat.sensorbase.uripattern;
002    
003    /**
004     * Logic operator for two patterns.
005     * 
006     * @author (Cedric) Qin ZHANG
007     */
008    interface Operator {
009    
010      /** And operator. */
011      static Operator AND = new AndOperator();
012      /** Or Operator. */
013      static Operator OR = new OrOperator();
014      /** Not operator. */
015      static Operator NOT = new NotOperator();
016      
017      /**
018       * Gets the arity of this operator.
019       * 
020       * @return The arity.
021       */
022      int getArity();
023      
024      /**
025       * Perform operator operation.
026       * 
027       * @param patterns The operand.
028       * @param filePath The file path to match.
029       * 
030       * @return True if there is a match.
031       */
032      boolean matches(Pattern[] patterns, String filePath);
033    }