public boolean equals(Object o) {
      
    //Simple cases:
    if (o==null)
      return false;
    if (!(o instanceof Path))
      return false;      
    
    Path otherPath=(Path)o;
    
    //This handles one half of nulls, next section handles other:  
    if (this.pathString==null && otherPath.pathString!=null)
      return false;            
    if (this.url==null && otherPath.url!=null)
      return false;
    
    //Voila:  
    return 
      (this.pathString!=null && this.pathString.equals(otherPath.pathString))
      ||
      (this.url!=null && this.url.equals(otherPath.url));
  }