1 package cz.cuni.amis.pogamut.usar2004.communication.messages.datatypes;
2
3 import java.io.Serializable;
4
5
6
7
8
9
10
11
12
13
14
15
16 public class LinkState implements Serializable, Cloneable
17 {
18 private int link = 0;
19 private double value = 0;
20 private double torque = 0;
21
22 public LinkState()
23 {
24 }
25
26 public LinkState(int link, double value, double torque)
27 {
28 this.link = link;
29 this.value = value;
30 this.torque = torque;
31 }
32
33 @Override
34 public Object clone()
35 {
36 return new LinkState(link, value, torque);
37 }
38
39 public final void set(int link, double value, double torque)
40 {
41 this.link = link;
42 this.value = value;
43 this.torque = torque;
44
45 }
46
47 public final void set(LinkState tplLS)
48 {
49 link = tplLS.link;
50 value = tplLS.value;
51 torque = tplLS.torque;
52 }
53
54
55
56
57
58
59
60 public final int getLink()
61 {
62 return link;
63 }
64
65 public final double getValue()
66 {
67 return value;
68 }
69
70 public final double getTorque()
71 {
72 return torque;
73 }
74 }