override fun equals(other: Any?): Boolean { if (other == null) return false if (javaClass != other.javaClass) { return false } val that: HostPort = other as HostPort return port === that.port && host!!.equals(that.host) }
returns true if the two objects are equals , false otherwise .