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

com.atlassian.jira.rest.client.api.domain.Subtask Maven / Gradle / Ivy

There is a newer version: 2.0.0-m32.w1
Show newest version
package com.atlassian.jira.rest.client.api.domain;

import com.google.common.base.Objects;

import java.net.URI;

/**
 *
 */
public class Subtask {

	private final String issueKey;
	private final URI issueUri;
	private final String summary;
	private final IssueType issueType;
	private final Status status;

	public Subtask(String issueKey, URI issueUri, String summary, IssueType issueType, Status status) {
		this.issueKey = issueKey;
		this.issueUri = issueUri;
		this.summary = summary;
		this.issueType = issueType;
		this.status = status;
	}

	public String getIssueKey() {
		return issueKey;
	}

	public URI getIssueUri() {
		return issueUri;
	}

	public String getSummary() {
		return summary;
	}

	public IssueType getIssueType() {
		return issueType;
	}

	public Status getStatus() {
		return status;
	}

	@Override
	public String toString() {
		return Objects.toStringHelper(this).addValue(super.toString()).
				add("issueKey", issueKey).
				add("issueUri", issueUri).
				add("summary", summary).
				add("issueType", issueType).
				add("status", status).
				toString();
	}


	@Override
	public boolean equals(Object obj) {
		if (obj instanceof Subtask) {
			Subtask that = (Subtask) obj;
			return super.equals(obj) && Objects.equal(this.issueKey, that.issueKey)
					&& Objects.equal(this.issueUri, that.issueUri)
					&& Objects.equal(this.summary, that.summary)
					&& Objects.equal(this.issueType, that.issueType)
					&& Objects.equal(this.status, that.status);
		}
		return false;
	}

	@Override
	public int hashCode() {
		return Objects.hashCode(super.hashCode(), issueKey, issueUri, summary, issueType, status);
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy