public PointerComposeState join(PointerComposeState pState) { FaultResultMapCollector localWarnings; if (pState.warnings == null) { localWarnings = warnings; } else { localWarnings = pState.warnings; } if (localWarnings != null) { localWarnings.collect(this.warnings); } PointerComposeState resultState; if (this.isLessOrEqual(pState)) { resultState = pState; } else if (pState.isLessOrEqual(this)) { resultState = this; } else { PointerState joinState = this.pointerState.join(pState.pointerState); Heap heap = this.heap.join(pState.heap); if (joinState == this.pointerState && heap == this.heap) { return this; } if (joinState == pState.pointerState && heap == pState.heap) { return pState; } resultState = new PointerComposeState(joinState, heap); } resultState.warnings = localWarnings; return resultState; }
@Override public boolean equals(Object obj) { PointerComposeState pointerComposeState = (PointerComposeState) obj; if (this.getPointerState().equals(pointerComposeState.getPointerState()) && this.heap.equals(pointerComposeState.heap)) { return true; } return false; }