public static boolean isEqual(ColorSpace a,ColorSpace b){
  if ((a instanceof ICC_ColorSpace) && (b instanceof ICC_ColorSpace)) {
    ICC_ColorSpace aicc=(ICC_ColorSpace)a;
    ICC_ColorSpace bicc=(ICC_ColorSpace)b;
    ICC_Profile ap=aicc.getProfile();
    ICC_Profile bp=bicc.getProfile();
    return ap.equals(bp);
  }
 else {
    return a.equals(b);
  }
}

public static boolean isEqual ( ColorSpace a , ColorSpace b ) { if ( ( a instanceof ICC_ColorSpace ) && ( b instanceof ICC_ColorSpace ) ) { ICC_ColorSpace aicc = ( ICC_ColorSpace ) a ; ICC_ColorSpace bicc = ( ICC_ColorSpace ) b ; ICC_Profile ap = aicc . getProfile ( ) ; ICC_Profile bp = bicc . getProfile ( ) ; return ap . equals ( bp ) ; } else { return a . equals ( b ) ; } }
returns true , if the two color spaces are equal .
