Subversion Repository Public Repository

litesoft

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.esotericsoftware.wildcard.support;

import com.esotericsoftware.wildcard.*;

public class ExactFileNameMatcher implements FileNameMatcher {
    private String mFileNameToMatch;

    public ExactFileNameMatcher( String pFileNameToMatch ) {
        if ( (mFileNameToMatch = pFileNameToMatch).contains( "/" ) ) {
            throw new IllegalArgumentException( "FileNames may NOT contain a '/'" );
        }
    }

    /**
     * return True if the file name specified with <code>fileName</code> is acceptable (NO path may be specified)
     *
     * @param filePath !null and !empty and trim()'d (NO path may be specified)
     */
    @Override
    public boolean acceptable( String fileName ) {
        return mFileNameToMatch.equals( fileName );
    }
}

Commits for litesoft/trunk/Java/ScarPlus/src/com/esotericsoftware/wildcard/support/ExactFileNameMatcher.java

Diff revisions: vs.
Revision Author Commited Message
959 Diff Diff GeorgeS picture GeorgeS Sat 19 Jul, 2014 15:27:50 +0000

Scar update

184 GeorgeS picture GeorgeS Tue 26 Apr, 2011 00:20:57 +0000