@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((avion == null) ? 0 : avion.hashCode()); result = prime * result + id; result = prime * result + ((pista == null) ? 0 : pista.hashCode()); result = prime * result + ((terminal == null) ? 0 : terminal.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Vuelo other = (Vuelo) obj; if (avion == null) { if (other.avion != null) return false; } else if (!avion.equals(other.avion)) return false; if (id != other.id) return false; if (pista == null) { if (other.pista != null) return false; } else if (!pista.equals(other.pista)) return false; if (terminal == null) { if (other.terminal != null) return false; } else if (!terminal.equals(other.terminal)) return false; return true; }