1 21 package org.dbunit.dataset.filter; 22 23 import java.util.HashSet ; 24 import java.util.Iterator ; 25 import java.util.Set ; 26 27 36 public class IncludeTableFilter extends AbstractTableFilter implements ITableFilter 37 { 38 private final PatternMatcher _patternMatcher = new PatternMatcher(); 39 40 44 public IncludeTableFilter() 45 { 46 } 47 48 51 public IncludeTableFilter(String [] tableNames) 52 { 53 for (int i = 0; i < tableNames.length; i++) 54 { 55 String tableName = tableNames[i]; 56 includeTable(tableName); 57 } 58 } 59 60 66 public void includeTable(String patternName) 67 { 68 _patternMatcher.addPattern(patternName); 69 } 70 71 public boolean isEmpty() 72 { 73 return _patternMatcher.isEmpty(); 74 } 75 76 79 public boolean isValidName(String tableName) 80 { 81 return _patternMatcher.accept(tableName); 82 } 83 } 84 | Popular Tags |