package jdepend.service.profile.scope; public class CommandProfileScope extends AbstractProfileScope { private static final long serialVersionUID = -1785680808798908968L; private String group; private String command; public String getGroup() { return group; } public void setGroup(String group) { this.group = group; } public String getCommand() { return command; } public void setCommand(String command) { this.command = command; } @Override public boolean isSelf(String group, String command) { return this.group.equals(group) && this.command.equals(command); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((command == null) ? 0 : command.hashCode()); result = prime * result + ((group == null) ? 0 : group.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; CommandProfileScope other = (CommandProfileScope) obj; if (command == null) { if (other.command != null) return false; } else if (!command.equals(other.command)) return false; if (group == null) { if (other.group != null) return false; } else if (!group.equals(other.group)) return false; return true; } }