⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 atlproblem.java

📁 papyrus插件MARTE例子,uml建模
💻 JAVA
字号:
package com.thalesgroup.cheddar.MARTE2cheddar.tools;


/**
 * Mapping of a PROBLEM!Problem element in Java
 * 
 * <copyright>
 * Thales MARTE to Cheddar (Copyright (c) THALES 2007 All rights reserved) is free software; you can redistribute itand/or modify
 * it under the terms of the Eclipse Public License as published in http://www.eclipse.org/legal/epl-v10.html
 *
 * Thales MARTE to Cheddar is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Eclipse Public License for more details.
 * </copyright>
 * @author Nicolas Vienne
 * @version 0.0.2, 13/09/2007
 */
public class ATLProblem {
	
	public enum Severity {
		critic,
		error,
		warning
	}
	
	protected String location = null;
	protected String description = null;
	protected Severity severity = null;
	
	public ATLProblem() {
		location = "";
		description = "";
		severity = Severity.error;
	}
	
	public ATLProblem(ATLProblem p) {
		location = p.location;
		description = p.description;
		severity = p.severity;
	}
	
	public ATLProblem(Severity severity, String location, String description) {
		this.location = location;
		this.description = description;
		this.severity = severity;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getLocation() {
		return location;
	}

	public void setLocation(String location) {
		this.location = location;
	}

	public Severity getSeverity() {
		return severity;
	}

	public void setSeverity(Severity severity) {
		this.severity = severity;
	}
	
	@Override
	public String toString() {
		return "["+this.severity.toString()+ "] " + this.location + " : " + this.description;
	}

	@Override
	public boolean equals(Object o) {
		if (o instanceof ATLProblem) {
			ATLProblem pb = (ATLProblem) o;
			return this.severity == pb.getSeverity()
				&& this.location.equals(pb.getLocation())
				&& this.description.equals(pb.getDescription());
		} else {
			return false;
		}
	}

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -