public final class ImmutableFeatureSetRule extends Object implements FeatureSetRule
FeatureSetRule.
Use the builder to create immutable instances:
ImmutableFeatureSetRule.builder().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFeatureSetRule.Builder
Builds instances of type
ImmutableFeatureSetRule. |
static interface |
ImmutableFeatureSetRule.BuildFinal |
static interface |
ImmutableFeatureSetRule.VersionRangeBuildStage |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFeatureSetRule.VersionRangeBuildStage |
builder()
Creates a builder for
ImmutableFeatureSetRule. |
static ImmutableFeatureSetRule |
copyOf(FeatureSetRule instance)
Creates an immutable copy of a
FeatureSetRule value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableFeatureSetRule that have equal attribute values. |
Set<Feature> |
features() |
int |
hashCode()
Computes a hash code from attributes:
versionRange, features. |
String |
toString()
Prints the immutable value
FeatureSetRule with attribute values. |
VersionRange |
versionRange() |
ImmutableFeatureSetRule |
withFeatures(Feature... elements)
Copy the current immutable object with elements that replace the content of
features. |
ImmutableFeatureSetRule |
withFeatures(Iterable<Feature> elements)
Copy the current immutable object with elements that replace the content of
features. |
ImmutableFeatureSetRule |
withVersionRange(VersionRange value)
Copy the current immutable object by setting a value for the
versionRange attribute. |
public VersionRange versionRange()
versionRange in interface FeatureSetRuleversionRange attributepublic Set<Feature> features()
features in interface FeatureSetRulefeatures attributepublic final ImmutableFeatureSetRule withVersionRange(VersionRange value)
versionRange attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for versionRangethis objectpublic final ImmutableFeatureSetRule withFeatures(Feature... elements)
features.elements - The elements to setthis objectpublic final ImmutableFeatureSetRule withFeatures(Iterable<Feature> elements)
features.
A shallow reference equality check is used to prevent copying of the same value by returning this.elements - An iterable of features elements to setthis objectpublic boolean equals(Object another)
ImmutableFeatureSetRule that have equal attribute values.public int hashCode()
versionRange, features.public String toString()
FeatureSetRule with attribute values.public static ImmutableFeatureSetRule copyOf(FeatureSetRule instance)
FeatureSetRule value.
Uses accessors to get values to initialize the new immutable instance.
If an instance is already immutable, it is returned as is.instance - The instance to copypublic static ImmutableFeatureSetRule.VersionRangeBuildStage builder()
ImmutableFeatureSetRule.
ImmutableFeatureSetRule.builder()
.versionRange(de.flapdoodle.embed.mongo.packageresolver.VersionRange) // required versionRange
.addFeatures|addAllFeatures(de.flapdoodle.embed.mongo.packageresolver.Feature) // features elements
.build();
builder in interface FeatureSetRuleCopyright © 2024. All rights reserved.