-3

是否有示例或教程教如何在 android 中创建复杂类型,喜欢Message<Double,Double,String,int>

4

1 回答 1

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;
}


}
于 2013-10-07T09:26:40.423 回答