code: public EnumConstant constant(String name) {
      for (EnumConstant constant : constants()) {
        if (constant.name().equals(name)) {
          return constant;
        }
      }
      return null;
    }
docs: Returns the constant named {@code name}, or null if this enum has no such constant.