code: private void parse(final String definition) throws BadThresholdException {
          String[] thresholdComponentAry = definition.split(",");
  
          for (String thresholdComponent : thresholdComponentAry) {
              String[] nameValuePair = thresholdComponent.split("=");
  
              if (nameValuePair.length != 2 || StringUtils.isEmpty(nameValuePair[0]) || StringUtils.isEmpty(nameValuePair[1])) {
                  throw new BadThresholdException("Invalid threshold syntax : " + definition);
              }
  
              if ("metric".equalsIgnoreCase(nameValuePair[0])) {
                  metricName = nameValuePair[1];
                  continue;
              }
              if ("ok".equalsIgnoreCase(nameValuePair[0])) {
  
                  Range thr = new Range(nameValuePair[1]);
  
                  okThresholdList.add(thr);
                  continue;
              }
              if ("warning".equalsIgnoreCase(nameValuePair[0]) || "warn".equalsIgnoreCase(nameValuePair[0]) || "w".equalsIgnoreCase(nameValuePair[0])) {
                  Range thr = new Range(nameValuePair[1]);
                  warningThresholdList.add(thr);
                  continue;
              }
              if ("critical".equalsIgnoreCase(nameValuePair[0]) || "crit".equalsIgnoreCase(nameValuePair[0]) || "c".equalsIgnoreCase(nameValuePair[0])) {
                  Range thr = new Range(nameValuePair[1]);
                  criticalThresholdList.add(thr);
                  continue;
              }
              if ("unit".equalsIgnoreCase(nameValuePair[0])) {
                  unit = nameValuePair[1];
                  continue;
              }
              if ("prefix".equalsIgnoreCase(nameValuePair[0])) {
                  prefix = Prefixes.fromString(nameValuePair[1]);
                  continue;
              }
  
              // Threshold specification error
          }
      }
docs: Parses a threshold definition.
  
  @param definition
  The threshold definition
  @throws BadThresholdException
  -