View Javadoc

1   package org.dfdaemon.il2.api.command.reply;
2   
3   /**
4    * @author aka50
5    */
6   public class ChannelInfo {
7       private int _id;
8       private int _ping;
9       private String _timeout = "";
10      private int _speed;
11  
12  
13      public ChannelInfo() {
14      }
15  
16      public ChannelInfo(int id, int ping, String timeout, int speed) {
17          this.setId(id);
18          this.setPing(ping);
19          this.setTimeout(timeout);
20          this.setSpeed(speed);
21      }
22  
23  
24      public int getId() {
25          return _id;
26      }
27  
28      public void setId(int id) {
29          this._id = id;
30      }
31  
32      public int getPing() {
33          return _ping;
34      }
35  
36      public void setPing(int ping) {
37          this._ping = ping;
38      }
39  
40      public String getTimeout() {
41          return _timeout;
42      }
43  
44      public void setTimeout(String timeout) {
45          this._timeout = timeout;
46      }
47  
48      public int getSpeed() {
49          return _speed;
50      }
51  
52      public void setSpeed(int speed) {
53          this._speed = speed;
54      }
55  
56      public boolean equals(Object o) {
57          if (this == o) return true;
58          if (o == null || getClass() != o.getClass()) return false;
59  
60          ChannelInfo that = (ChannelInfo) o;
61  
62          return getId() == that.getId() && getPing() == that.getPing() && getSpeed() == that.getSpeed() && getTimeout().equals(that.getTimeout());
63  
64      }
65  
66      public int hashCode() {
67          int result;
68          result = getId();
69          result = 31 * result + getPing();
70          result = 31 * result + getTimeout().hashCode();
71          result = 31 * result + getSpeed();
72          return result;
73      }
74  
75  
76      public String toString() {
77          final StringBuilder sb = new StringBuilder();
78          sb.append("ChannelInfo");
79          sb.append("{");
80          sb.append("_id=").append(getId());
81          sb.append(", _ping=").append(getPing());
82          sb.append(", _timeout='").append(getTimeout()).append('\'');
83          sb.append(", _speed=").append(getSpeed());
84          sb.append('}');
85          return sb.toString();
86      }
87  }