📄 typedescription.java
字号:
// Copyright <applicate>, 2002. All Rights Reserved.
// This software is the proprietary information of www.applicate.de.
// Use is subject to license terms.
package de.applicate.util.lang;
/**
* The description field has no influence on {link #equals}!
*
* @author Holger Schulz
* @created 7. Juli 2002
* @version 1.0
*/
public abstract class TypeDescription extends Type implements WithDescription {
private final String m_sDescription;
protected TypeDescription(final int _nID, final String _sDescription) {
super(_nID);
m_sDescription = _sDescription;
}
public String getDescription() {
return m_sDescription;
}
public String toString() {
return m_sDescription;
}
public static void main(String[] args) {
TypeDescription td_1_a =
new TypeDescription(1, "Hello") {
};
TypeDescription td_1_b =
new TypeDescription(1, "World") {
};
System.out.println("td_1_a == td_1_b : " + (td_1_a == td_1_b));
System.out.println("td_1_a.equals(td_1_b) : " + td_1_a.equals(td_1_b));
System.out.println("td_1_a.equalIDs(td_1_b) : " + td_1_a.equalIDs(td_1_b));
System.out.println("td_1_a.compareTo(td_1_b): " + td_1_a.compareTo(td_1_b));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -