com.github.rauberprojects.client.profile.ProfileImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of client-core Show documentation
Show all versions of client-core Show documentation
Reusable core classes for any client implementation.
package com.github.rauberprojects.client.profile;
/**
* @author Thomas Eizinger
*/
public class ProfileImpl implements Profile {
private final String identifier;
public ProfileImpl(String identifier) {
this.identifier = identifier;
}
@Override
public String getIdentifier() {
return identifier;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ProfileImpl profile = (ProfileImpl) o;
return !(identifier != null ? !identifier.equals(profile.identifier) : profile.identifier != null);
}
@Override
public int hashCode() {
return identifier != null ? identifier.hashCode() : 0;
}
@Override
public String toString() {
return String.format("Profile{%s}", identifier);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy