
org.freedesktop.dbus.SignalTuple Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dbus-java Show documentation
Show all versions of dbus-java Show documentation
Slightly improved version of the Java DBus library
provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/).
Changes:
- Fixed lot's of Java warnings
- Fixed broken 'Gettext' feature (Exceptions on unsupported languages, usage of "_" as method name).
- Renamed some classes/methods/variables to comply with Java naming scheme.
- Removed usage of proprietary logger and replaced it with sl4fj.
- Renamed/refactored some parts to be more 'Java' like (e.g. naming, shadowing)
- Fixed problems with DbusConnection.getConnection(SESSION) when using display export (e.g. SSH X11 forward)
/*
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 {
// CHECKSTYLE:OFF
String type;
String name;
String object;
String source;
// CHECKSTYLE:ON
SignalTuple(String _type, String _name, String _object, String _source) {
this.type = _type;
this.name = _name;
this.object = _object;
this.source = _source;
}
@Override
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;
}
@Override
public int hashCode() {
return (null == type ? 0 : type.hashCode()) + (null == name ? 0 : name.hashCode()) + (null == source ? 0 : source.hashCode()) + (null == object ? 0 : object.hashCode());
}
@Override
public String toString() {
return "SignalTuple(" + type + "," + name + "," + object + "," + source + ")";
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy