Package huskymaps
Class Location.Builder
- java.lang.Object
-
- huskymaps.Location.Builder
-
- Enclosing class:
- Location
public static class Location.Builder extends Object
Interactively constructs a new location when the fields are not all immediately available.Location.Builder builder = new Location.Builder() .setLon(...) .setLat(...); ... builder.setName(...); Location result = builder.build();
- See Also:
Location
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Location
build()
Returns a newLocation
from the fields of this builder.Location.Builder
setLat(double lat)
Sets the latitude for this builder.Location.Builder
setLon(double lon)
Sets the longitude for this builder.Location.Builder
setName(String name)
Sets the name for this builder.
-
-
-
Field Detail
-
lon
private double lon
-
lat
private double lat
-
name
private String name
-
-
Method Detail
-
setLon
public Location.Builder setLon(double lon)
Sets the longitude for this builder.- Parameters:
lon
- the longitude.- Returns:
- this builder.
-
setLat
public Location.Builder setLat(double lat)
Sets the latitude for this builder.- Parameters:
lat
- the latitude.- Returns:
- this builder.
-
setName
public Location.Builder setName(String name)
Sets the name for this builder.- Parameters:
name
- the name.- Returns:
- this builder.
-
-