Home | History | Annotate | Download | only in filefilter

Lines Matching defs:prefixes

49     /** The filename prefixes to search for */
50 private final String[] prefixes;
78 this.prefixes = new String[] {prefix};
83 * Constructs a new Prefix file filter for any of an array of prefixes.
88 * @param prefixes the prefixes to allow, must not be null
91 public PrefixFileFilter(String[] prefixes) {
92 this(prefixes, IOCase.SENSITIVE);
96 * Constructs a new Prefix file filter for any of an array of prefixes
102 * @param prefixes the prefixes to allow, must not be null
107 public PrefixFileFilter(String[] prefixes, IOCase caseSensitivity) {
108 if (prefixes == null) {
109 throw new IllegalArgumentException("The array of prefixes must not be null");
111 this.prefixes = prefixes;
116 * Constructs a new Prefix file filter for a list of prefixes.
118 * @param prefixes the prefixes to allow, must not be null
122 public PrefixFileFilter(List<String> prefixes) {
123 this(prefixes, IOCase.SENSITIVE);
127 * Constructs a new Prefix file filter for a list of prefixes
130 * @param prefixes the prefixes to allow, must not be null
136 public PrefixFileFilter(List<String> prefixes, IOCase caseSensitivity) {
137 if (prefixes == null) {
138 throw new IllegalArgumentException("The list of prefixes must not be null");
140 this.prefixes = prefixes.toArray(new String[prefixes.size()]);
148 * @return true if the filename starts with one of our prefixes
153 for (int i = 0; i < this.prefixes.length; i++) {
154 if (caseSensitivity.checkStartsWith(name, prefixes[i])) {
166 * @return true if the filename starts with one of our prefixes
170 for (int i = 0; i < prefixes.length; i++) {
171 if (caseSensitivity.checkStartsWith(name, prefixes[i])) {
188 if (prefixes != null) {
189 for (int i = 0; i < prefixes.length; i++) {
193 buffer.append(prefixes[i]);