code: public Collection<CliOptionContainer> getOptions(CliModeObject mode) {
  
      String modeId = mode.getId();
      // create set of active modes...
      Set<String> modeIdSet = new HashSet<>();
      modeIdSet.add(modeId);
      Collection<CliModeContainer> extendedModes = ((CliModeContainer) mode).getExtendedModes();
      for (CliModeObject childMode : extendedModes) {
        modeIdSet.add(childMode.getId());
      }
      List<CliOptionContainer> result = new ArrayList<>();
      for (CliOptionContainer option : this.optionList) {
        if (modeIdSet.contains(option.getOption().mode())) {
          result.add(option);
        }
      }
      return result;
    }
docs: This method gets the {@link CliOption options} for the given {@link CliModeObject mode}.
  
  @param mode is the {@link CliModeObject} for which the {@link CliOption options} are required.
  @return a {@link Collection} with all {@link CliOption options} that are {@link CliOption#mode() compatible} with
  the given {@code mode}.