@SuppressWarnings({"rawtypes", "unchecked"})
  public void setEnumsSetComparable(Map<String, Set<Comparable>> enums)
  {
    Preconditions.checkNotNull(enums);
    areEnumsUpdated = true;
    Map<String, List<Object>> enumsList = Maps.newHashMap();
    //Check that all the given keys are valid
    Preconditions.checkArgument(
        configurationSchema.getKeyDescriptor().getFields().getFields().containsAll(enums.keySet()),
        "The given map doesn't contain valid keys. Valid keys are %s and the provided keys are %s",
        configurationSchema.getKeyDescriptor().getFields().getFields(),
        enums.keySet());
    //Todo check the type of the objects, for now just set them on the enum.
    for (Map.Entry<String, Set<Comparable>> entry : enums.entrySet()) {
      String name = entry.getKey();
      Set<Comparable> vals = entry.getValue();
      Preconditions.checkNotNull(name);
      Preconditions.checkNotNull(vals);
      for (Object value : entry.getValue()) {
        Preconditions.checkNotNull(value);
      }
      List<Comparable> valsListComparable = Lists.newArrayList(vals);
      Collections.sort(valsListComparable);
      List<Object> valsList = (List)valsListComparable;
      enumsList.put(name, valsList);
    }
    currentEnumVals = Maps.newHashMap(enumsList);
  }
@SuppressWarnings({"rawtypes", "unchecked"})
  public void setEnumsSetComparable(Map<String, Set<Comparable>> enums)
  {
    Preconditions.checkNotNull(enums);
    areEnumsUpdated = true;
    Map<String, List<Object>> enumsList = Maps.newHashMap();
   
    Preconditions.checkArgument(
        configurationSchema.getKeyDescriptor().getFields().getFields().containsAll(enums.keySet()),
        "The given map doesn't contain valid keys. Valid keys are %s and the provided keys are %s",
        configurationSchema.getKeyDescriptor().getFields().getFields(),
        enums.keySet());
   
    for (Map.Entry<String, Set<Comparable>> entry : enums.entrySet()) {
      String name = entry.getKey();
      Set<Comparable> vals = entry.getValue();
      Preconditions.checkNotNull(name);
      Preconditions.checkNotNull(vals);
      for (Object value : entry.getValue()) {
        Preconditions.checkNotNull(value);
      }
      List<Comparable> valsListComparable = Lists.newArrayList(vals);
      Collections.sort(valsListComparable);
      List<Object> valsList = (List)valsListComparable;
      enumsList.put(name, valsList);
    }
    currentEnumVals = Maps.newHashMap(enumsList);
  }
@suppresswarnings({"rawtypes", "unchecked"}) public void setenumssetcomparable(map<string, set<comparable>> enums) { preconditions.checknotnull(enums); areenumsupdated = true; map<string, list<object>> enumslist = maps.newhashmap(); preconditions.checkargument( configurationschema.getkeydescriptor().getfields().getfields().containsall(enums.keyset()), "the given map doesn't contain valid keys. valid keys are %s and the provided keys are %s", configurationschema.getkeydescriptor().getfields().getfields(), enums.keyset()); for (map.entry<string, set<comparable>> entry : enums.entryset()) { string name = entry.getkey(); set<comparable> vals = entry.getvalue(); preconditions.checknotnull(name); preconditions.checknotnull(vals); for (object value : entry.getvalue()) { preconditions.checknotnull(value); } list<comparable> valslistcomparable = lists.newarraylist(vals); collections.sort(valslistcomparable); list<object> valslist = (list)valslistcomparable; enumslist.put(name, valslist); } currentenumvals = maps.newhashmap(enumslist); }