예제 #1
0
  @Nonnull
  public static StatusCode findStatusCode(final int code) {
    for (final StatusCode statusCode : values()) {
      if (statusCode.getCode() == code) {
        return statusCode;
      }
    }

    throw new RuntimeException("Unexpected status code: " + code);
  }