mirror of
https://github.com/wahyd4/pinpoint.git
synced 2026-08-17 08:46:22 +10:00
git-svn-id: http://svn.bds.nhncorp.com/pe/hippo-web/trunk@2877 84d0f5b1-2673-498c-a247-62c4ff18d310
74 lines
1.7 KiB
Java
74 lines
1.7 KiB
Java
package com.nhn.pinpoint.web.service;
|
|
|
|
/**
|
|
* @author emeroad
|
|
*/
|
|
public class ComplexNodeId implements NodeId {
|
|
private Node src;
|
|
private Node dest;
|
|
|
|
public ComplexNodeId(Node src, Node dest) {
|
|
if (src == null) {
|
|
throw new NullPointerException("src must not be null");
|
|
}
|
|
if (dest == null) {
|
|
throw new NullPointerException("dest must not be null");
|
|
}
|
|
this.src = src;
|
|
this.dest = dest;
|
|
}
|
|
|
|
public Node getSrc() {
|
|
return src;
|
|
}
|
|
|
|
public void setSrc(Node src) {
|
|
if (src == null) {
|
|
throw new NullPointerException("src must not be null");
|
|
}
|
|
|
|
this.src = src;
|
|
}
|
|
|
|
public Node getDest() {
|
|
return dest;
|
|
}
|
|
|
|
public void setDest(Node dest) {
|
|
if (dest == null) {
|
|
throw new NullPointerException("dest must not be null");
|
|
}
|
|
|
|
this.dest = dest;
|
|
}
|
|
|
|
@Override
|
|
public boolean equals(Object o) {
|
|
if (this == o) return true;
|
|
if (o == null || getClass() != o.getClass()) return false;
|
|
|
|
ComplexNodeId that = (ComplexNodeId) o;
|
|
|
|
if (!dest.equals(that.dest)) return false;
|
|
if (!src.equals(that.src)) return false;
|
|
|
|
return true;
|
|
}
|
|
|
|
@Override
|
|
public int hashCode() {
|
|
int result = src.hashCode();
|
|
result = 31 * result + dest.hashCode();
|
|
return result;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
final StringBuilder sb = new StringBuilder("ComplexNodeId{");
|
|
sb.append("src=").append(src);
|
|
sb.append(", dest=").append(dest);
|
|
sb.append('}');
|
|
return sb.toString();
|
|
}
|
|
}
|