code: public static ArrayList<PackedRuleRecord> getPackedRule(
        ArrayList<SameLengthMotifs> newAllClassifiedMotifs) {
  
      ArrayList<PackedRuleRecord> arrPackedRuleRecords = new ArrayList<PackedRuleRecord>();
      int i = 0;
      for (SameLengthMotifs subsequencesInClass : newAllClassifiedMotifs) {
        int classIndex = i;
        int subsequencesNumber = subsequencesInClass.getSameLenMotifs().size();
        int minLength = subsequencesInClass.getMinMotifLen();
        int maxLength = subsequencesInClass.getMaxMotifLen();
  
        PackedRuleRecord packedRuleRecord = new PackedRuleRecord();
        packedRuleRecord.setClassIndex(classIndex);
        packedRuleRecord.setSubsequenceNumber(subsequencesNumber);
        packedRuleRecord.setMinLength(minLength);
        packedRuleRecord.setMaxLength(maxLength);
  
        arrPackedRuleRecords.add(packedRuleRecord);
        i++;
      }
  
      return arrPackedRuleRecords;
    }
docs: Gets packed rules set.
  
  @param newAllClassifiedMotifs a parameter.
  @return packed rule set.