@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof TerminateInstancesResult == false) return false; TerminateInstancesResult other = (TerminateInstancesResult) obj; if (other.getTerminatingInstances() == null ^ this.getTerminatingInstances() == null) return false; if (other.getTerminatingInstances() != null && other.getTerminatingInstances().equals(this.getTerminatingInstances()) == false) return false; return true; }
private void printStateChanges(TerminateInstancesResult tir) { List<InstanceStateChange> states = tir.getTerminatingInstances(); out.println("Terminated " + states.size() + " instances:"); for (InstanceStateChange state : states) { out.println( state.getInstanceId() + ": " + state.getPreviousState() + " -> " + state.getCurrentState()); } }