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

deepdiff.core.DiffScope Maven / Gradle / Ivy

There is a newer version: 1.0.2
Show newest version
/*
 * Copyright 2011 DeepDiff Contributors
 *
 * Licensed 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.
 */
package deepdiff.core;

/**
 * An area that can be scanned for units of comparison. The most common example
 * is a pair of directories. The root directories themselves form a scope. The
 * files within the directories would then be units of comparison. The child
 * directories could be either units of comparison or additional scopes. Note
 * that it is possible to have scopes that are not based on directories.
 * Compressed archives such as Zip files could be valid scopes, as can any other
 * hierarchical file format, such as XML.
 */
public interface DiffScope {
    /**
     * Scans the scope for {@link DiffUnit}s, and passes them to the
     * unitProcessor with the specified pointProcessor.
     *
     * @param unitProcessor the {@link DiffUnitProcessor} to process the
     *                      {@link DiffUnit} found in the scope
     * @param pointProcessor the {@link DiffPointProcessor} to process the
     *                       {@link DiffPoint}s found in the scope
     */
    void scan(DiffUnitProcessor unitProcessor,
              DiffPointProcessor pointProcessor);

    /**
     * Returns the path of the scope
     *
     * @return the path of the scope
     */
    String getPath();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy