Class OpenLocation.Builder
java.lang.Object
com.dna.jopt.member.unit.converter.openlocation.OpenLocation.Builder
- All Implemented Interfaces:
OpenLocation.BuildFinal
,OpenLocation.CodeBuildStage
- Enclosing class:
- OpenLocation
@NotThreadSafe
public static final class OpenLocation.Builder
extends Object
implements OpenLocation.CodeBuildStage, OpenLocation.BuildFinal
Builds instances of type
OpenLocation
.
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.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds a newOpenLocation
.final OpenLocation.Builder
Initializes the value for thecode
attribute.
-
Method Details
-
code
Initializes the value for thecode
attribute.- Specified by:
code
in interfaceOpenLocation.CodeBuildStage
- Parameters:
code
- The value for code- Returns:
this
builder for use in a chained invocation
-
build
Builds a newOpenLocation
.- Specified by:
build
in interfaceOpenLocation.BuildFinal
- Returns:
- An immutable instance of OpenLocation
- Throws:
IllegalStateException
- if any required attributes are missing
-