@@ -0,0 +1,2160 @@
+/*%0A * Copyright 1999,2004 The Apache Software Foundation.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *      http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0A%0Apackage org.apache.log4j.lbel;%0A%0A%0A/**%0A * %3Ccode%3EOperator%3C/code%3E is an enumeration of known comparison operators.%0A * %0A * @author %3Ca href=%22http://www.qos.ch/log4j/%22%3ECeki G&uuml;lc&uuml;%3C/a%3E%0A */%0Afinal public class Operator %7B%0A  public static final int EQUAL = 1;%0A  public static final int NOT_EQUAL = 2;%0A%0A  public static final int GREATER = 10;%0A  public static final int GREATER_OR_EQUAL = 11;%0A  %0A  public static final int LESS = 20;%0A  public static final int LESS_OR_EQUAL = 21;%0A  %0A  public static final int REGEX_MATCH = 30;%0A  public static final int NOT_REGEX_MATCH = 31;%0A  %0A  public static final int CHILDOF = 40;%0A  %0A  int code;%0A%0A  Operator(int code) %7B%0A    switch(code) %7B%0A    case EQUAL: %0A    case NOT_EQUAL: %0A    case GREATER:    %0A    case GREATER_OR_EQUAL:    %0A    case LESS:    %0A    case LESS_OR_EQUAL: %0A    case REGEX_MATCH: %0A    case NOT_REGEX_MATCH:%0A    case CHILDOF:%0A      break;%0A    default: %0A      new IllegalArgumentException(%22Unknown operator code %5B%22+code+%22%5D%22);%0A    %7D%0A  %7D%0A%0A  public int getCode() %7B%0A    return code;%0A  %7D%0A  %0A  public boolean isRegex() %7B%0A    return (code == REGEX_MATCH) %7C%7C (code == NOT_REGEX_MATCH);%0A  %7D%0A  %0A  public String toString() %7B%0A    switch(code) %7B%0A    case EQUAL: return %22=%22;%0A    case NOT_EQUAL: return %22!=%22;%0A    case GREATER:    return %22%3E%22;%0A    case GREATER_OR_EQUAL: return %22%3E=%22;   %0A    case LESS:    return %22%3C%22;%0A    case LESS_OR_EQUAL: return %22%3C=%22;%0A    case REGEX_MATCH: return %22~%22;%0A    case NOT_REGEX_MATCH: return %22!~%22;%0A    case CHILDOF: return %22CHILDOF%22;%0A    %7D%0A    return %22UNKNOWN_OPERATOR%22;%0A  %7D%0A  %0A%7D%0A

Support class for operators.