1 /*
2    D-Bus Java Implementation
3    Copyright (c) 2005-2006 Matthew Johnson
4 
5    This program is free software; you can redistribute it and/or modify it
6    under the terms of either the GNU Lesser General Public License Version 2 or the
7    Academic Free Licence Version 2.1.
8 
9    Full licence texts are included in the COPYING file with this program.
10 */
11 package org.freedesktop.dbus;
12 
13 import cx.ath.matthew.debug.Debug;
14 
15 class MethodTuple
16 {
17    String name;
18    String sig;
MethodTuple(String name, String sig)19    public MethodTuple(String name, String sig)
20    {
21       this.name = name;
22       if (null != sig)
23          this.sig = sig;
24       else
25          this.sig = "";
26       if (Debug.debug) Debug.print(Debug.VERBOSE, "new MethodTuple("+this.name+", "+this.sig+")");
27    }
equals(Object o)28    public boolean equals(Object o)
29    {
30       return o.getClass().equals(MethodTuple.class)
31             && ((MethodTuple) o).name.equals(this.name)
32             && ((MethodTuple) o).sig.equals(this.sig);
33    }
hashCode()34    public int hashCode()
35    {
36       return name.hashCode()+sig.hashCode();
37    }
38 }
39