1 /* 2 Copyright (c) 2010 James Ahlborn 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 16 */ 17 18 package com.healthmarketscience.jackcess.util; 19 20 import com.healthmarketscience.jackcess.Table; 21 22 /** 23 * Interface for handling comparisons between column values. 24 * 25 * @author James Ahlborn 26 * @usage _intermediate_class_ 27 */ 28 @FunctionalInterface 29 public interface ColumnMatcher 30 { 31 32 /** 33 * Returns {@code true} if the given value1 should be considered a match for 34 * the given value2 for the given column in the given table, {@code false} 35 * otherwise. 36 * 37 * @param table the relevant table 38 * @param columnName the name of the relevant column within the table 39 * @param value1 the first value to match (may be {@code null}) 40 * @param value2 the second value to match (may be {@code null}) 41 */ 42 public boolean matches(Table table, String columnName, Object value1, 43 Object value2); 44 }