public static final class LocationList.Builder extends Object
LocationLists. Repeat calls to
build() will return multiple lists in series with each new list
containing all the Locations of the one before it. Builders do not
permit the addition of null elements.
Use LocationList.builder() to create new builder instances.
| Modifier and Type | Method and Description |
|---|---|
LocationList.Builder |
add(double lat,
double lon)
Add a new
Location specified by the supplied latitude and
longitude and a depth of 0 km to the LocationList. |
LocationList.Builder |
add(double lat,
double lon,
double depth)
Add a new
Location specified by the supplied latitude, longitude,
and depth to the LocationList. |
LocationList.Builder |
add(Location... locs)
Add each
Location in locs to the LocationList . |
LocationList.Builder |
add(Location loc)
Add a
Location to the LocationList. |
LocationList.Builder |
addAll(Iterable<Location> locs)
Add each
Location in locs to the LocationList . |
LocationList |
build()
Return a newly created
LocationList. |
public LocationList.Builder add(Location loc)
Location to the LocationList.loc - to addBuilderpublic LocationList.Builder add(double lat, double lon)
Location specified by the supplied latitude and
longitude and a depth of 0 km to the LocationList.lat - latitude in decimal degreeslon - longitude in decimal degreesBuilderIllegalArgumentException - if any values are out of rangeCoordinatespublic LocationList.Builder add(double lat, double lon, double depth)
Location specified by the supplied latitude, longitude,
and depth to the LocationList.lat - latitude in decimal degreeslon - longitude in decimal degreesdepth - in km (positive down)BuilderIllegalArgumentException - if any values are out of rangeCoordinatespublic LocationList.Builder add(Location... locs)
Location in locs to the LocationList .locs - to addBuilderpublic LocationList.Builder addAll(Iterable<Location> locs)
Location in locs to the LocationList .locs - to addBuilderpublic LocationList build()
LocationList.LocationsIllegalStateException - if the list to be returned is empty