Package com.io7m.montarre.api
Class MPlatformFileFilter.Builder
java.lang.Object
com.io7m.montarre.api.MPlatformFileFilter.Builder
- Enclosing class:
MPlatformFileFilter
Builds instances of type
MPlatformFileFilter.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExcludes(Iterable<? extends Pattern> elements) Adds elements toexcludeslist.addAllIncludes(Iterable<? extends Pattern> elements) Adds elements toincludeslist.addExcludes(Pattern element) Adds one element toexcludeslist.addExcludes(Pattern... elements) Adds elements toexcludeslist.addIncludes(Pattern element) Adds one element toincludeslist.addIncludes(Pattern... elements) Adds elements toincludeslist.build()Builds a newMPlatformFileFilter.from(MPlatformFileFilterType instance) Fill a builder with attribute values from the providedMPlatformFileFilterTypeinstance.setArchitecture(MArchitectureName architecture) Initializes the value for thearchitectureattribute.setExcludes(Iterable<? extends Pattern> elements) Sets or replaces all elements forexcludeslist.setIncludes(Iterable<? extends Pattern> elements) Sets or replaces all elements forincludeslist.setOperatingSystem(MOperatingSystemName operatingSystem) Initializes the value for theoperatingSystemattribute.
-
Method Details
-
from
Fill a builder with attribute values from the providedMPlatformFileFilterTypeinstance. Regular attribute values will be replaced with those from the given instance. Absent optional values will not replace present values. Collection elements and entries will be added, not replaced.- Parameters:
instance- The instance from which to copy values- Returns:
thisbuilder for use in a chained invocation
-
setArchitecture
Initializes the value for thearchitectureattribute.- Parameters:
architecture- The value for architecture- Returns:
thisbuilder for use in a chained invocation
-
setOperatingSystem
Initializes the value for theoperatingSystemattribute.- Parameters:
operatingSystem- The value for operatingSystem- Returns:
thisbuilder for use in a chained invocation
-
addIncludes
Adds one element toincludeslist.- Parameters:
element- A includes element- Returns:
thisbuilder for use in a chained invocation
-
addIncludes
Adds elements toincludeslist.- Parameters:
elements- An array of includes elements- Returns:
thisbuilder for use in a chained invocation
-
setIncludes
Sets or replaces all elements forincludeslist.- Parameters:
elements- An iterable of includes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllIncludes
Adds elements toincludeslist.- Parameters:
elements- An iterable of includes elements- Returns:
thisbuilder for use in a chained invocation
-
addExcludes
Adds one element toexcludeslist.- Parameters:
element- A excludes element- Returns:
thisbuilder for use in a chained invocation
-
addExcludes
Adds elements toexcludeslist.- Parameters:
elements- An array of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
setExcludes
Sets or replaces all elements forexcludeslist.- Parameters:
elements- An iterable of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
addAllExcludes
Adds elements toexcludeslist.- Parameters:
elements- An iterable of excludes elements- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newMPlatformFileFilter.- Returns:
- An immutable instance of MPlatformFileFilter
- Throws:
IllegalStateException- if any required attributes are missing
-