cd156f2531ff9fd5f511ae9153d74ca2940f28aa
[jalview.git] / src / jalview / ws / api / UIinfo.java
1 package jalview.ws.api;
2
3 /**
4  * Service UI Info { Action, Specific Name of Service, Brief Description }
5  */
6
7 public class UIinfo
8 {
9   public UIinfo(String action, String name, String description)
10   {
11     this.Action = action == null ? "" : action;
12     this.description = description == null ? "" : description;
13     this.Name = name == null ? "" : name;
14   }
15
16   public String getAction()
17   {
18     return Action;
19   }
20
21   public void setAction(String action)
22   {
23     Action = action;
24   }
25
26   public String getName()
27   {
28     return Name;
29   }
30
31   public void setName(String name)
32   {
33     Name = name;
34   }
35
36   public String getDescription()
37   {
38     return description;
39   }
40
41   public void setDescription(String description)
42   {
43     this.description = description;
44   }
45
46   @Override
47   public boolean equals(Object object)
48   {
49     if (object == null || !(object instanceof UIinfo))
50     {
51       return false;
52     }
53     UIinfo other = (UIinfo) object;
54
55     return (Name == null && other.getName() == null || Name != null
56             && other.getName() != null && Name.equals(other.getName()))
57             && (Action == null && other.getAction() == null
58                     || Action != null && other.getAction() != null
59                             && Action.equals(other.getAction()))
60             && (description == null && other.getDescription() == null
61                     || description != null && other.getDescription() != null
62                             && description.equals(other.getDescription()));
63   }
64
65   String Action;
66
67   String Name;
68
69   String description;
70 }