public int hashCode() { int result; result = (sourceNode != null ? sourceNode.hashCode() : 0); result = 29 * result + (targetNode != null ? targetNode.hashCode() : 0); result = 29 * result + (sourceCell != null ? sourceCell.hashCode() : 0); result = 29 * result + (targetCell != null ? targetCell.hashCode() : 0); result = 29 * result + (linkEdge != null ? linkEdge.hashCode() : 0); return result; }
/** * Overloaded function to provide caller an explicit way to display this object's string * representation. * * @param explictlyCalled * @return this object's string representation */ public String toString(boolean explictlyCalled) { String source = null; String target = null; if (sourceNode != null) { source = sourceNode.toString(); } if (targetNode != null) { target = targetNode.toString(); } return "(" + source + " - " + target + "): " + sourceCell + ", " + targetCell; // + ", " + linkEdge; }
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof MappingViewCommonComponent)) return false; final MappingViewCommonComponent mappingViewCommonComponent = (MappingViewCommonComponent) o; if (linkEdge != null ? !linkEdge.equals(mappingViewCommonComponent.linkEdge) : mappingViewCommonComponent.linkEdge != null) return false; if (sourceCell != null ? !sourceCell.equals(mappingViewCommonComponent.sourceCell) : mappingViewCommonComponent.sourceCell != null) return false; if (sourceNode != null ? !sourceNode.equals(mappingViewCommonComponent.sourceNode) : mappingViewCommonComponent.sourceNode != null) return false; if (targetCell != null ? !targetCell.equals(mappingViewCommonComponent.targetCell) : mappingViewCommonComponent.targetCell != null) return false; if (targetNode != null ? !targetNode.equals(mappingViewCommonComponent.targetNode) : mappingViewCommonComponent.targetNode != null) return false; return true; }
/** * Set mappable flag of source and target node to a new value. * * @param newValue */ public void setMappableFlag(boolean newValue) { if (sourceNode != null) sourceNode.setMapStatus(newValue); if (targetNode != null) targetNode.setMapStatus(newValue); }
public boolean isTargetNode(MappableNode aNode) { return targetNode.equals(aNode); }
public boolean isSourceNode(MappableNode aNode) { return sourceNode.equals(aNode); }