1
2
3
4
5 package org.epics.pvmanager;
6
7
8
9
10
11
12
13
14
15 public class ChannelReadRecipe {
16 private final String channelName;
17 private final ChannelHandlerReadSubscription readSubscription;
18
19
20
21
22
23
24
25 public ChannelReadRecipe(String channelName, ChannelHandlerReadSubscription readSubscription) {
26 this.channelName = channelName;
27 this.readSubscription = readSubscription;
28 }
29
30
31
32
33
34
35 public String getChannelName() {
36 return channelName;
37 }
38
39
40
41
42
43
44 public ChannelHandlerReadSubscription getReadSubscription() {
45 return readSubscription;
46 }
47
48 @Override
49 public int hashCode() {
50 int hash = 5;
51 hash = 59 * hash + (this.channelName != null ? this.channelName.hashCode() : 0);
52 return hash;
53 }
54
55 @Override
56 public boolean equals(Object obj) {
57 if (obj == null) {
58 return false;
59 }
60 if (getClass() != obj.getClass()) {
61 return false;
62 }
63 final ChannelReadRecipe other = (ChannelReadRecipe) obj;
64 if (this.readSubscription != other.readSubscription && (this.readSubscription == null || !this.readSubscription.equals(other.readSubscription))) {
65 return false;
66 }
67 return true;
68 }
69
70 @Override
71 public String toString() {
72 return "[ChannelReadRecipe for " + channelName + ": " + readSubscription + "]";
73 }
74
75 }