private static ValueConstraint parseConstraint(String name, String text, int clauseIndex, int constraintIndex) throws ParseException {
    if (StringUtil.isEmpty(name)) throw new ParseException(JavaAnalysisBundle.message("inspection.contract.checker.empty.constraint"));
    for (ValueConstraint constraint : ValueConstraint.values()) {
      if (constraint.toString().equals(name)) return constraint;
    }
    String allowedClause = StreamEx.of(ValueConstraint.values()).joining(", ");
    String message = JavaAnalysisBundle.message("inspection.contract.checker.unknown.constraint", allowedClause, name);
    throw ParseException.forConstraint(message, text, clauseIndex, constraintIndex);
  }
private static ValueConstraint parseConstraint(String name, String text, int clauseIndex, int constraintIndex)