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.BuilderInitializes the value for thecodeattribute.
-
Method Details
-
code
Initializes the value for thecodeattribute.- Specified by:
codein interfaceOpenLocation.CodeBuildStage- Parameters:
code- The value for code- Returns:
thisbuilder for use in a chained invocation
-
build
Builds a newOpenLocation.- Specified by:
buildin interfaceOpenLocation.BuildFinal- Returns:
- An immutable instance of OpenLocation
- Throws:
IllegalStateException- if any required attributes are missing
-