All Implemented Interfaces:

@Plugin(name="IfAny", category="Core", printObject=true) public final class IfAny extends Object implements PathCondition
Composite PathCondition that accepts objects that are accepted by any component conditions. Corresponds to logical "OR".
  • Method Details

    • getDeleteFilters

      public PathCondition[] getDeleteFilters()
    • accept

      public boolean accept(Path baseDir, Path relativePath, BasicFileAttributes attrs)
      Description copied from interface: PathCondition
      Returns true if the specified candidate path should be deleted, false otherwise.
      Specified by:
      accept in interface PathCondition
      baseDir - the directory from where to start scanning for deletion candidate files
      relativePath - the candidate for deletion. This path is relative to the baseDir.
      attrs - attributes of the candidate path
      whether the candidate path should be deleted
    • beforeFileTreeWalk

      public void beforeFileTreeWalk()
      Description copied from interface: PathCondition
      Invoked before a new file tree walk is started. Stateful PathConditions can reset their state when this method is called.
      Specified by:
      beforeFileTreeWalk in interface PathCondition
    • createOrCondition

      @PluginFactory public static IfAny createOrCondition(@PluginElement("PathConditions") @Required(message="No components provided for IfAny") PathCondition... components)
      Create a Composite PathCondition: accepts if any of the nested conditions accepts.
      components - The component conditions.
      A Composite PathCondition.
    • toString

      public String toString()
      toString in class Object