
b4j.core.session.bugzilla.BugzillaPriority Maven / Gradle / Ivy
/*
* This file is part of Bugzilla for Java.
*
* Bugzilla for Java is free software: you can redistribute it
* and/or modify it under the terms of version 3 of the GNU
* Lesser General Public License as published by the Free Software
* Foundation.
*
* Bugzilla for Java is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Bugzilla for Java. If not, see
* .
*/
package b4j.core.session.bugzilla;
import b4j.core.AbstractBugzillaObject;
import b4j.core.Priority;
/**
* Bugzilla implementation of a {@link Priority}.
* @author ralph
* @since 2.0
*
*/
public class BugzillaPriority extends AbstractBugzillaObject implements Priority {
private String priority;
/**
* Constructor.
*/
public BugzillaPriority(String priority) {
this.priority = priority;
}
/**
* {@inheritDoc}
*/
@Override
public String getName() {
return priority;
}
/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getName() == null) ? 0 : getName().hashCode());
return result;
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object obj) {
if (this == obj) return true;
if (obj == null) return false;
if (getClass() != obj.getClass()) return false;
BugzillaPriority other = (BugzillaPriority) obj;
if (getName() == null) {
if (other.getName() != null) return false;
} else if (!getName().equals(other.getName())) return false;
return true;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return getName();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy