home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / VPage / Java.bin / CLASSES.ZIP / sun / net / www / http / KeepAliveKey.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-07-08  |  1.1 KB  |  30 lines

  1. package sun.net.www.http;
  2.  
  3. import java.net.URL;
  4.  
  5. class KeepAliveKey {
  6.    private String protocol;
  7.    private String host;
  8.    private int port;
  9.  
  10.    public KeepAliveKey(URL var1) {
  11.       this.protocol = var1.getProtocol();
  12.       this.host = var1.getHost();
  13.       this.port = var1.getPort();
  14.    }
  15.  
  16.    public boolean equals(Object var1) {
  17.       if (!(var1 instanceof KeepAliveKey)) {
  18.          return false;
  19.       } else {
  20.          KeepAliveKey var2 = (KeepAliveKey)var1;
  21.          return this.host.equals(var2.host) && this.port == var2.port && this.protocol.equals(var2.protocol);
  22.       }
  23.    }
  24.  
  25.    public int hashCode() {
  26.       String var1 = this.protocol + this.host + this.port;
  27.       return var1.hashCode();
  28.    }
  29. }
  30.