public static final class ImmutableVersionRange.Builder extends Object
ImmutableVersionRange.
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.
| Modifier and Type | Method and Description |
|---|---|
ImmutableVersionRange |
build()
Builds a new
ImmutableVersionRange. |
ImmutableVersionRange.Builder |
from(VersionRange instance)
Fill a builder with attribute values from the provided
VersionRange instance. |
ImmutableVersionRange.Builder |
max(NumericVersion max)
Initializes the value for the
max attribute. |
ImmutableVersionRange.Builder |
min(NumericVersion min)
Initializes the value for the
min attribute. |
public final ImmutableVersionRange.Builder from(VersionRange instance)
VersionRange instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.instance - The instance from which to copy valuesthis builder for use in a chained invocationpublic final ImmutableVersionRange.Builder min(NumericVersion min)
min attribute.min - The value for minthis builder for use in a chained invocationpublic final ImmutableVersionRange.Builder max(NumericVersion max)
max attribute.max - The value for maxthis builder for use in a chained invocationpublic ImmutableVersionRange build()
ImmutableVersionRange.IllegalStateException - if any required attributes are missingCopyright © 2021. All rights reserved.