private void computeFiltersFromDefault(IndicatorViewState oldState){
  filters=new ArrayList<Filter>();
  Set<String> defaultFilterNames=new HashSet<String>();
  for (  Filter defaultFilter : defaultFilters) {
    filters.add(defaultFilter);
    if (defaultFilter.name != null)     defaultFilterNames.add(defaultFilter.name);
  }
  if (oldState != null) {
    for (    Filter oldFilter : oldState.filters) {
      if (oldFilter.name == null || !defaultFilterNames.contains(oldFilter.name))       filters.add(oldFilter);
    }
  }
}

private void computeFiltersFromDefault ( IndicatorViewState oldState ) { filters = new ArrayList < Filter > ( ) ; Set < String > defaultFilterNames = new HashSet < String > ( ) ; for ( Filter defaultFilter : defaultFilters ) { filters . add ( defaultFilter ) ; if ( defaultFilter . name != null ) defaultFilterNames . add ( defaultFilter . name ) ; } if ( oldState != null ) { for ( Filter oldFilter : oldState . filters ) { if ( oldFilter . name == null || ! defaultFilterNames . contains ( oldFilter . name ) ) filters . add ( oldFilter ) ; } } }
computes the filters by combining the default filters and the user - defined filters stored in the previously saved state .
