public final class ImmutableFeatureSet extends FeatureSet
FeatureSet.
Use the builder to create immutable instances:
ImmutableFeatureSet.builder().
Use the static factory method to create immutable instances:
ImmutableFeatureSet.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableFeatureSet.Builder
Builds instances of type
ImmutableFeatureSet. |
| Modifier and Type | Method and Description |
|---|---|
static ImmutableFeatureSet.Builder |
builder()
Creates a builder for
ImmutableFeatureSet. |
static ImmutableFeatureSet |
copyOf(FeatureSet instance)
Creates an immutable copy of a
FeatureSet value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableFeatureSet that have equal attribute values. |
protected Set<Feature> |
features() |
int |
hashCode()
Computes a hash code from attributes:
features. |
static ImmutableFeatureSet |
of(Iterable<Feature> features)
Construct a new immutable
FeatureSet instance. |
static ImmutableFeatureSet |
of(Set<Feature> features)
Construct a new immutable
FeatureSet instance. |
String |
toString()
Prints the immutable value
FeatureSet with attribute values. |
ImmutableFeatureSet |
withFeatures(Feature... elements)
Copy the current immutable object with elements that replace the content of
features. |
ImmutableFeatureSet |
withFeatures(Iterable<Feature> elements)
Copy the current immutable object with elements that replace the content of
features. |
enabledprotected Set<Feature> features()
features in class FeatureSetfeatures attributepublic final ImmutableFeatureSet withFeatures(Feature... elements)
features.elements - The elements to setthis objectpublic final ImmutableFeatureSet 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)
ImmutableFeatureSet that have equal attribute values.public int hashCode()
features.public String toString()
FeatureSet with attribute values.public static ImmutableFeatureSet of(Set<Feature> features)
FeatureSet instance.features - The value for the features attributepublic static ImmutableFeatureSet of(Iterable<Feature> features)
FeatureSet instance.features - The value for the features attributepublic static ImmutableFeatureSet copyOf(FeatureSet instance)
FeatureSet 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 ImmutableFeatureSet.Builder builder()
ImmutableFeatureSet.
ImmutableFeatureSet.builder()
.addFeatures|addAllFeatures(de.flapdoodle.embed.mongo.packageresolver.Feature) // features elements
.build();
Copyright © 2025. All rights reserved.