All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.freedesktop.dbus.DBusPath Maven / Gradle / Ivy

Go to download

Improved version of the DBus-Java library provided by freedesktop.org (https://dbus.freedesktop.org/doc/dbus-java/). This is the OSGi compliant bundle of all required libraries in one bundle.

There is a newer version: 5.1.1
Show newest version
package org.freedesktop.dbus;

import java.util.Objects;

public class DBusPath implements Comparable {
    private String path;

    public DBusPath(String _path) {
        setPath(_path);
    }

    public String getPath() {
        return path;
    }

    @Override
    public String toString() {
        return getPath();
    }

    @Override
    public int hashCode() {
        return Objects.hash(path);
    }

    @Override
    public boolean equals(Object _obj) {
        if (this == _obj) {
            return true;
        } else if (_obj == null || getClass() != _obj.getClass()) {
            return false;
        }
        return Objects.equals(path, ((DBusPath) _obj).path);
    }

    @Override
    public int compareTo(DBusPath _that) {
        if (getPath() == null || _that == null) {
            return 0;
        }
        return getPath().compareTo(_that.getPath());
    }

    public void setPath(String _path) {
        path = _path;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy