@Override public final boolean equals(Object obj){
  if (obj == null)   return false;
  if (this == obj)   return true;
  if (!(obj instanceof Scheme))   return false;
  Scheme s=(Scheme)obj;
  return (name.equals(s.name) && defaultPort == s.defaultPort && layered == s.layered && socketFactory.equals(s.socketFactory));
}

@ Override public final boolean equals ( Object obj ) { if ( obj == null ) return false ; if ( this == obj ) return true ; if ( ! ( obj instanceof Scheme ) ) return false ; Scheme s = ( Scheme ) obj ; return ( name . equals ( s . name ) && defaultPort == s . defaultPort && layered == s . layered && socketFactory . equals ( s . socketFactory ) ) ; }
compares this scheme to an object .
