summaryrefslogtreecommitdiff
path: root/src/traffic-incidents-service/org.genivi.trafficinfo.dbus-java/src/main/java/org/freedesktop/dbus/SignalTuple.java
blob: 94cadeed12685412ccf7e5a0486b6cd4e14f8781 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
   D-Bus Java Implementation
   Copyright (c) 2005-2006 Matthew Johnson

   This program is free software; you can redistribute it and/or modify it
   under the terms of either the GNU Lesser General Public License Version 2 or the
   Academic Free Licence Version 2.1.

   Full licence texts are included in the COPYING file with this program.
*/
package org.freedesktop.dbus;
class SignalTuple
{
   String type;
   String name;
   String object;
   String source;
   public SignalTuple(String type, String name, String object, String source)
   {
      this.type = type;
      this.name = name;
      this.object = object;
      this.source = source;
   }
   public boolean equals(Object o)
   {
      if (!(o instanceof SignalTuple)) return false;
      SignalTuple other = (SignalTuple) o;
      if (null == this.type && null != other.type) return false;
      if (null != this.type && !this.type.equals(other.type)) return false;
      if (null == this.name && null != other.name) return false;
      if (null != this.name && !this.name.equals(other.name)) return false;
      if (null == this.object && null != other.object) return false;
      if (null != this.object && !this.object.equals(other.object)) return false;
      if (null == this.source && null != other.source) return false;
      if (null != this.source && !this.source.equals(other.source)) return false;
      return true;
   }
   public int hashCode()
   {
      return (null == type ? 0 : type.hashCode())
         +   (null == name ? 0 : name.hashCode())
         +   (null == source ? 0 : source.hashCode())
         +   (null == object ? 0 : object.hashCode());
   }
   public String toString()
   {
      return "SignalTuple("+type+","+name+","+object+","+source+")";
   }
}