public boolean removeUndefinedAttributes(){
  LinkedList<String> undefined=new LinkedList<>();
  for (  String attribute : getAttributeSet()) {
    Map<String,Object> sample2values=getSamples2Values(attribute);
    boolean ok=false;
    for (    String sample : sample2values.keySet()) {
      if (sample2values.get(sample) != null) {
        ok=true;
        break;
      }
    }
    if (!ok)     undefined.add(attribute);
  }
  if (undefined.size() > 0)   removeAttributes(undefined);
  return undefined.size() > 0;
}

public boolean removeUndefinedAttributes ( ) { LinkedList < String > undefined = new LinkedList < > ( ) ; for ( String attribute : getAttributeSet ( ) ) { Map < String , Object > sample2values = getSamples2Values ( attribute ) ; boolean ok = false ; for ( String sample : sample2values . keySet ( ) ) { if ( sample2values . get ( sample ) != null ) { ok = true ; break ; } } if ( ! ok ) undefined . add ( attribute ) ; } if ( undefined . size ( ) > 0 ) removeAttributes ( undefined ) ; return undefined . size ( ) > 0 ; }
removes all attributes for which no sample has a defined value
