private boolean areClassesEqual(Class<?> c1,Class<?> c2){
  if (isMap(c1)) {
    return isMap(c2);
  }
 else   if (isList(c1)) {
    return isList(c2);
  }
 else {
    return c1.equals(c2);
  }
}

private boolean areClassesEqual ( Class < ? > c1 , Class < ? > c2 ) { if ( isMap ( c1 ) ) { return isMap ( c2 ) ; } else if ( isList ( c1 ) ) { return isList ( c2 ) ; } else { return c1 . equals ( c2 ) ; } }
when comparing literals allow subclasses of maps and lists to be directly compared even if they have different implementations .
