📄 testvo.java
字号:
/*
* Created on 27-ene-2005 15:38:18
*
*/
package com.martincuervo.javatest.business.vo;
import java.util.Map;
/**
* @author Jorge Martin Cuervo <jorge@martincuervo.com>
*
*/
public class TestVO implements IJavaTestVO {
private int id;
private String text;
private int maxQuestions;
/**
* contiene en la clave un objeto de tipo CategoryVO y en el valor un objeto
* de tipo RangeVO
*/
private Map categories;
public TestVO(int id) {
super();
this.id = id;
}
public TestVO(int id, String text, int maxQuestions, Map categories) {
super();
this.id = id;
this.text = text;
this.maxQuestions = maxQuestions;
this.categories = categories;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
public Map getCategories() {
return categories;
}
public void setCategories(Map categories) {
this.categories = categories;
}
public int getMaxQuestions() {
return maxQuestions;
}
public void setMaxQuestions(int maxQuestions) {
this.maxQuestions = maxQuestions;
}
public boolean equals(Object obj) {
boolean valRet = false;
if (obj != null && obj instanceof TestVO) {
TestVO t = (TestVO)obj;
valRet = (id == t.id && text.equals(t.text)
&& maxQuestions == t.maxQuestions
&& (
(categories == null && t.categories == null) ||
(categories != null && t.categories != null &&
categories.equals(t.categories))
)
);
}
return valRet;
}
public String toString() {
return "[" + this.getClass().getName() + ": " +
"id=" + id + ", " +
"text=" + text + ", " +
"maxQuestions=" + maxQuestions + ", " +
"categories=" + categories +
"]";
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -