Class MPlatformFileFilter
java.lang.Object
com.io7m.montarre.api.MPlatformFileFilter
- All Implemented Interfaces:
MPlatformFileFilterType
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 belonging to the given architecture and operating system.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeMPlatformFileFilter. -
Method Summary
Modifier and TypeMethodDescriptionstatic MPlatformFileFilter.Builderbuilder()Creates a builder forMPlatformFileFilter.static MPlatformFileFiltercopyOf(MPlatformFileFilterType instance) Creates an immutable copy of aMPlatformFileFilterTypevalue.booleanThis instance is equal to all instances ofMPlatformFileFilterthat have equal attribute values.excludes()inthashCode()Computes a hash code from attributes:architecture,operatingSystem,includes,excludes.includes()toString()Prints the immutable valueMPlatformFileFilterwith attribute values.final MPlatformFileFilterCopy the current immutable object by setting a value for thearchitectureattribute.final MPlatformFileFilterwithExcludes(Iterable<? extends Pattern> elements) Copy the current immutable object with elements that replace the content ofexcludes.final MPlatformFileFilterwithExcludes(Pattern... elements) Copy the current immutable object with elements that replace the content ofexcludes.final MPlatformFileFilterwithIncludes(Iterable<? extends Pattern> elements) Copy the current immutable object with elements that replace the content ofincludes.final MPlatformFileFilterwithIncludes(Pattern... elements) Copy the current immutable object with elements that replace the content ofincludes.final MPlatformFileFilterCopy the current immutable object by setting a value for theoperatingSystemattribute.Methods inherited from interface MPlatformFileFilterType
evaluate
-
Method Details
-
architecture
- Specified by:
architecturein interfaceMPlatformFileFilterType- Returns:
- The architecture
-
operatingSystem
- Specified by:
operatingSystemin interfaceMPlatformFileFilterType- Returns:
- The operating system
-
includes
- Specified by:
includesin interfaceMPlatformFileFilterType- Returns:
- The filename inclusion patterns
-
excludes
- Specified by:
excludesin interfaceMPlatformFileFilterType- Returns:
- The filename exclusion patterns
-
withArchitecture
Copy the current immutable object by setting a value for thearchitectureattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for architecture- Returns:
- A modified copy or the
thisobject
-
withOperatingSystem
Copy the current immutable object by setting a value for theoperatingSystemattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for operatingSystem- Returns:
- A modified copy or the
thisobject
-
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 or
thisif not changed
-
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 or
thisif not changed
-
equals
-
hashCode
-
toString
-
copyOf
Creates an immutable copy of aMPlatformFileFilterTypevalue. 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 MPlatformFileFilter instance
-
builder
Creates a builder forMPlatformFileFilter.MPlatformFileFilter.builder() .setArchitecture(com.io7m.montarre.api.MArchitectureName) // required
architecture.setOperatingSystem(com.io7m.montarre.api.MOperatingSystemName) // requiredoperatingSystem.addIncludes|addAllIncludes(regex.Pattern) //includeselements .addExcludes|addAllExcludes(regex.Pattern) //excludeselements .build();- Returns:
- A new MPlatformFileFilter builder
-