Class MFileFilter
java.lang.Object
com.io7m.montarre.api.MFileFilter
- All Implemented Interfaces:
MFileFilterType
A file filter.
If a file is matched by at least one inclusion filter, and not matched by any exclusion filter, then the file will be treated as included.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic MFileFilter.Builderbuilder()Creates a builder forMFileFilter.static MFileFiltercopyOf(MFileFilterType instance) Creates an immutable copy of aMFileFilterTypevalue.booleanThis instance is equal to all instances ofMFileFilterthat have equal attribute values.excludes()inthashCode()Computes a hash code from attributes:includes,excludes.includes()toString()Prints the immutable valueMFileFilterwith attribute values.final MFileFilterwithExcludes(Iterable<? extends Pattern> elements) Copy the current immutable object with elements that replace the content ofexcludes.final MFileFilterwithExcludes(Pattern... elements) Copy the current immutable object with elements that replace the content ofexcludes.final MFileFilterwithIncludes(Iterable<? extends Pattern> elements) Copy the current immutable object with elements that replace the content ofincludes.final MFileFilterwithIncludes(Pattern... elements) Copy the current immutable object with elements that replace the content ofincludes.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.io7m.montarre.api.MFileFilterType
evaluate
-
Method Details
-
includes
- Specified by:
includesin interfaceMFileFilterType- Returns:
- The filename inclusion patterns
-
excludes
- Specified by:
excludesin interfaceMFileFilterType- Returns:
- The filename exclusion patterns
-
withIncludes
Copy the current immutable object with elements that replace the content ofincludes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withIncludes
Copy the current immutable object with elements that replace the content ofincludes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of includes elements to set- Returns:
- A modified copy of
thisobject
-
withExcludes
Copy the current immutable object with elements that replace the content ofexcludes.- Parameters:
elements- The elements to set- Returns:
- A modified copy of
thisobject
-
withExcludes
Copy the current immutable object with elements that replace the content ofexcludes. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
elements- An iterable of excludes elements to set- Returns:
- A modified copy of
thisobject
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMFileFilterTypevalue. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.- Parameters:
instance- The instance to copy- Returns:
- A copied immutable MFileFilter instance
-
builder
Creates a builder forMFileFilter.MFileFilter.builder() .addIncludes|addAllIncludes(regex.Pattern) //includeselements .addExcludes|addAllExcludes(regex.Pattern) //excludeselements .build();- Returns:
- A new MFileFilter builder
-