是否有示例或教程教授如何在Android中创建复杂类型,喜欢Message<Double,Double,String,int>
?
答案 0 :(得分:2)
你为什么不自己上课?请更好地了解JAVA,并查看Java书籍。
public class Message {
private double _double1, double2;
private String _message;
private int _number;
public Message(double _double1, double double2, String _message, int _number) {
super();
this._double1 = _double1;
this.double2 = double2;
this._message = _message;
this._number = _number;
}
public double get_double1() {
return _double1;
}
public void set_double1(double _double1) {
this._double1 = _double1;
}
public double getDouble2() {
return double2;
}
public void setDouble2(double double2) {
this.double2 = double2;
}
public String get_message() {
return _message;
}
public void set_message(String _message) {
this._message = _message;
}
public int get_number() {
return _number;
}
public void set_number(int _number) {
this._number = _number;
}
}