public static final class ImmutableNumericVersion.Builder extends Object
ImmutableNumericVersion.
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 |
|---|---|
ImmutableNumericVersion |
build()
Builds a new
ImmutableNumericVersion. |
ImmutableNumericVersion.Builder |
from(NumericVersion instance)
Fill a builder with attribute values from the provided
NumericVersion instance. |
ImmutableNumericVersion.Builder |
major(int major)
Initializes the value for the
major attribute. |
ImmutableNumericVersion.Builder |
minor(int minor)
Initializes the value for the
minor attribute. |
ImmutableNumericVersion.Builder |
patch(int patch)
Initializes the value for the
patch attribute. |
public final ImmutableNumericVersion.Builder from(NumericVersion instance)
NumericVersion 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 ImmutableNumericVersion.Builder major(int major)
major attribute.major - The value for majorthis builder for use in a chained invocationpublic final ImmutableNumericVersion.Builder minor(int minor)
minor attribute.minor - The value for minorthis builder for use in a chained invocationpublic final ImmutableNumericVersion.Builder patch(int patch)
patch attribute.patch - The value for patchthis builder for use in a chained invocationpublic ImmutableNumericVersion build()
ImmutableNumericVersion.IllegalStateException - if any required attributes are missingCopyright © 2021. All rights reserved.