package com.njcn.pojo.weeklyreport;

public class AreaPointInfoData implements Comparable<AreaPointInfoData> {
	private String name; // 名称
	private int onLine; // 监测点在线个数
	private int offLine;// 监测点离线个数
	private int eventCount;// 发生的暂降个数

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getOnLine() {
		return onLine;
	}

	public void setOnLine(int onLine) {
		this.onLine = onLine;
	}

	public int getOffLine() {
		return offLine;
	}

	public void setOffLine(int offLine) {
		this.offLine = offLine;
	}

	public int getEventCount() {
		return eventCount;
	}

	public void setEventCount(int eventCount) {
		this.eventCount = eventCount;
	}

	@Override
	public int compareTo(AreaPointInfoData arg0) {
		int result = (arg0.offLine + arg0.onLine) - (this.offLine + this.onLine);

		if (result != 0) {
			return result;
		}

		return arg0.eventCount - this.eventCount;
	}

}
