code: public boolean isTrivial(Integer complexity) {
      int len = payload.length;
      if ((null == complexity) || (len < 2)) {
        return true;
      }
      else if ((complexity.intValue() > 0) && (len > 2)) {
        Set<Character> seen = new TreeSet<Character>();
        for (int i = 0; i < len; i++) {
          Character c = Character.valueOf(this.payload[i]);
          if (seen.contains(c)) {
            continue;
          }
          else {
            seen.add(c);
          }
        }
        if (complexity.intValue() <= seen.size()) {
          return false;
        }
      }
      return true;
    }
docs: Check the complexity of the string.
  
  @param complexity If 1 - single letter used, 2 - two or more letters, 3 - 3 or more etc..
  
  @return Returns true if complexity conditions are met.