public final class ImmutableToolVersionRange extends ToolVersionRange
ToolVersionRange.
Use the builder to create immutable instances:
ImmutableToolVersionRange.builder().
Use the static factory method to create immutable instances:
ImmutableToolVersionRange.of().
| Modifier and Type | Class and Description |
|---|---|
static class |
ImmutableToolVersionRange.Builder
Builds instances of type
ImmutableToolVersionRange. |
DistributionMatch.All, DistributionMatch.AndThen, DistributionMatch.Any| Modifier and Type | Method and Description |
|---|---|
static ImmutableToolVersionRange.Builder |
builder()
Creates a builder for
ImmutableToolVersionRange. |
static ImmutableToolVersionRange |
copyOf(ToolVersionRange instance)
Creates an immutable copy of a
ToolVersionRange value. |
boolean |
equals(Object another)
This instance is equal to all instances of
ImmutableToolVersionRange that have equal attribute values. |
int |
hashCode()
Computes a hash code from attributes:
min, max. |
static ImmutableToolVersionRange |
of(NumericVersion min,
NumericVersion max)
Construct a new immutable
ToolVersionRange instance. |
String |
toString()
Prints the immutable value
ToolVersionRange with attribute values. |
ImmutableToolVersionRange |
withMax(NumericVersion value)
Copy the current immutable object by setting a value for the
max attribute. |
ImmutableToolVersionRange |
withMin(NumericVersion value)
Copy the current immutable object by setting a value for the
min attribute. |
check, match, match, of, ofclone, finalize, getClass, notify, notifyAll, wait, wait, waitall, andThen, any, anypublic final ImmutableToolVersionRange withMin(NumericVersion value)
min attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for minthis objectpublic final ImmutableToolVersionRange withMax(NumericVersion value)
max attribute.
A shallow reference equality check is used to prevent copying of the same value by returning this.value - A new value for maxthis objectpublic boolean equals(Object another)
ImmutableToolVersionRange that have equal attribute values.public int hashCode()
min, max.public String toString()
ToolVersionRange with attribute values.public static ImmutableToolVersionRange of(NumericVersion min, NumericVersion max)
ToolVersionRange instance.min - The value for the min attributemax - The value for the max attributepublic static ImmutableToolVersionRange copyOf(ToolVersionRange instance)
ToolVersionRange 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 ImmutableToolVersionRange.Builder builder()
ImmutableToolVersionRange.
ImmutableToolVersionRange.builder()
.min(de.flapdoodle.embed.mongo.packageresolver.NumericVersion) // required min
.max(de.flapdoodle.embed.mongo.packageresolver.NumericVersion) // required max
.build();
Copyright © 2023. All rights reserved.