package com.ard.work.api.domian;
|
|
import lombok.AllArgsConstructor;
|
import lombok.Data;
|
import lombok.NoArgsConstructor;
|
import java.io.Serializable;
|
|
/**
|
* @Description: 点位坐标
|
* @ClassName: Point
|
* @Author: 刘苏义
|
* @Date: 2023年08月22日9:56:58
|
* @Version: 1.0
|
**/
|
@Data
|
@NoArgsConstructor
|
@AllArgsConstructor
|
public class Point implements Serializable {
|
|
private static final long serialVersionUID = 1L;
|
|
/**
|
* 经度
|
*/
|
private Double longitude;
|
/**
|
* 纬度
|
*/
|
private Double latitude;
|
/**
|
* 海拔
|
*/
|
private Double altitude;
|
|
/**
|
* 检查当前Point对象的经纬度和海拔是否全部非null
|
* @throws IllegalArgumentException 如果任何字段为null
|
*/
|
public void validate() {
|
if (longitude == null || latitude == null || altitude == null) {
|
throw new IllegalArgumentException("坐标点经纬度或海拔不能为null");
|
}
|
}
|
}
|