Ignore:
Timestamp:
02/19/13 09:41:27 (11 years ago)
Author:
pharms
Message:
  • prevent logging of the same GUI elements several times
  • improved efficiency of hash code calculation
  • improved efficiency of reuse of GUI elements
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-htmlmonitor/src/main/java/de/ugoe/cs/autoquest/htmlmonitor/HtmlDocument.java

    r1075 r1089  
    4545     
    4646    /** 
     47     * the hash code of this document 
     48     */ 
     49    private int hashCode; 
     50     
     51    /** 
    4752     * <p> 
    4853     * instantiates a new document element 
     
    7479            this.query = "?" + this.query; 
    7580        } 
     81         
     82        this.hashCode = this.server.hashCode() + this.path.hashCode() + 
     83            (this.query != null ? this.query.hashCode() : 0) + 
     84            (this.title != null ? this.title.hashCode() : 0); 
    7685    } 
    7786 
     
    138147    @Override 
    139148    public int hashCode() { 
    140         return server.hashCode() + path.hashCode() + (query != null ? query.hashCode() : 0) + 
    141             (title != null ? title.hashCode() : 0); 
     149        return hashCode; 
    142150    } 
    143151 
Note: See TracChangeset for help on using the changeset viewer.