code: public void insertSequence(final List<Group> groups) {
      if (groups != null && !groups.isEmpty() && !sequenceMap.containsValue(groups)) {
        sequenceMap.put(groups.get(0).getSequence(), groups);
      }
    }
docs: insert a sequence (list) of groups.
  
  @param groups list of groups to add