se.bjurr.violations.comments.bitbucketserver.lib.client.model.DiffHunk Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of violation-comments-to-bitbucket-server-lib Show documentation
Show all versions of violation-comments-to-bitbucket-server-lib Show documentation
Library that adds violation comments from static code analysis to Bitbucket Server.
The newest version!
package se.bjurr.violations.comments.bitbucketserver.lib.client.model;
import java.util.List;
public class DiffHunk {
private final List segments;
public DiffHunk() {
segments = null;
}
public DiffHunk(List segments) {
this.segments = segments;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
DiffHunk other = (DiffHunk) obj;
if (segments == null) {
if (other.segments != null) {
return false;
}
} else if (!segments.equals(other.segments)) {
return false;
}
return true;
}
public List getSegments() {
return segments;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + (segments == null ? 0 : segments.hashCode());
return result;
}
@Override
public String toString() {
return "DiffHunk [segments=" + segments + "]";
}
}