All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.dubboclub.maven.clean.Selector Maven / Gradle / Ivy

The newest version!
package net.dubboclub.maven.clean;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

/**
 * Determines whether a path is selected for deletion. The pathnames used for method parameters will be relative to some
 * base directory and use {@link java.io.File#separatorChar} as separator.
 * 
 * @author Benjamin Bentmann
 */
interface Selector
{

    /**
     * Determines whether a path is selected for deletion.
     * 
     * @param pathname The pathname to test, must not be null.
     * @return true if the given path is selected for deletion, false otherwise.
     */
    boolean isSelected(String pathname);

    /**
     * Determines whether a directory could contain selected paths.
     * 
     * @param pathname The directory pathname to test, must not be null.
     * @return true if the given directory might contain selected paths, false if the
     *         directory will definitively not contain selected paths..
     */
    boolean couldHoldSelected(String pathname);

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy