/** * Returns the {@link io.vertx.core.dns.DnsResponseCode} that corresponds with the given * {@code responseCode}. * * @param responseCode * the error code's id * @return corresponding {@link io.vertx.core.dns.DnsResponseCode} */ public static DnsResponseCode valueOf(int responseCode) { DnsResponseCode[] errors = DnsResponseCode.values(); for (DnsResponseCode e : errors) { if (e.errorCode == responseCode) { return e; } } return null; }
/** * Returns the {@link io.vertx.core.dns.DnsResponseCode} that corresponds with the given * {@code responseCode}. * * @param responseCode * the error code's id * @return corresponding {@link io.vertx.core.dns.DnsResponseCode} */ public static DnsResponseCode valueOf(int responseCode) { DnsResponseCode[] errors = DnsResponseCode.values(); for (DnsResponseCode e : errors) { if (e.errorCode == responseCode) { return e; } } return null; }