Code example for UUID

Methods: equals

0
        if (!super.equals(o)) {
            return false; 
        } 
 
        HandshakeMessage that = (HandshakeMessage) o;
        return id.equals(that.id);
    } 
 
    @Override 
    public int hashCode() { 
        int result = super.hashCode();
        result = 31 * result + id.hashCode();
        return result;
    } 
 
}