HistoryArrival.java 2.6 KB
package com.bsth.entity;

import java.util.Date;

public class HistoryArrival {

	private int id;
	private String deviceId;
	private int lineId;
	private String stopNo;
	private long timestamp;
	private int upDown;
	private int upDown1;
	// 0进站 1出站
	private int inOut = -1;
	private Date createDate;
	private float totalMiles;
	private float lon;
	private float lat;
	
	// true场内 false场外
	private boolean state;
	
	// 特殊情况下进站也是出站
	private String lastStopNo;
	private int lastUpDown;
	
	public boolean getState() {
		return state;
	}

	public void setState(boolean state) {
		this.state = state;
	}

	public int getInOut() {
		return inOut;
	}

	public void setInOut(int inOut) {
		this.inOut = inOut;
	}

	public float getLon() {
		return lon;
	}

	public void setLon(float lon) {
		this.lon = lon;
	}

	public float getLat() {
		return lat;
	}

	public void setLat(float lat) {
		this.lat = lat;
	}

	public float getTotalMiles() {
		return totalMiles;
	}

	public void setTotalMiles(float totalMiles) {
		this.totalMiles = totalMiles;
	}

	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}

	public String getDeviceId() {
		return deviceId;
	}

	public void setDeviceId(String deviceId) {
		this.deviceId = deviceId;
	}

	public int getLineId() {
		return lineId;
	}

	public void setLineId(int lineId) {
		this.lineId = lineId;
	}

	public String getStopNo() {
		return stopNo;
	}

	public void setStopNo(String stopNo) {
		this.stopNo = stopNo;
	}

	public long getTimestamp() {
		return timestamp;
	}

	public void setTimestamp(long timestamp) {
		this.timestamp = timestamp;
	}

	public int getUpDown() {
		return upDown;
	}

	public void setUpDown(int upDown) {
		this.upDown = upDown;
	}

	public int getUpDown1() {
		return upDown1;
	}

	public void setUpDown1(int upDown1) {
		this.upDown1 = upDown1;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	
	public String getLastStopNo() {
		return lastStopNo;
	}

	public void setLastStopNo(String lastStopNo) {
		this.lastStopNo = lastStopNo;
	}

	public int getLastUpDown() {
		return lastUpDown;
	}

	public void setLastUpDown(int lastUpDown) {
		this.lastUpDown = lastUpDown;
	}

	public String toString() {
		return "deviceID" + deviceId + "stopNo" + stopNo + "timestamp" + new Date(timestamp) + "inout" + inOut;
	}
	
	@Override
	public boolean equals(Object obj) {
		HistoryArrival temp = (HistoryArrival)obj;
		return temp.getTimestamp() == this.getTimestamp() && temp.getLon() == this.getLon() && temp.getLat() == this.getLat();
	}
}