public int compareTo(LibPadstack p_other){
  if (p_other == null)   return 0;
  return pads_name.compareToIgnoreCase(p_other.pads_name);
}

public int compareTo ( LibPadstack p_other ) { if ( p_other == null ) return 0 ; return pads_name . compareToIgnoreCase ( p_other . pads_name ) ; }
compares 2 padstacks by name . useful for example to display padstacks in alphabetic order .
