@Override
 public int hashCode() {
   final int prime = 31;
   int result = prime + score;
   result = prime * result + ((scoredWebResult == null) ? 0 : scoredWebResult.hashCode());
   result = prime * result + (int) (tagsHash ^ (tagsHash >>> 32));
   return result;
 }
 @Override
 public int compareTo(ScoringResult other) {
   if (this.score > other.score) return -1;
   if (this.score < other.score) return 1;
   int comparingResult;
   if ((comparingResult = scoredWebResult.compareTo(other.scoredWebResult)) != 0)
     return comparingResult;
   return Long.compare(tagsHash, other.tagsHash);
 }
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   ScoringResult other = (ScoringResult) obj;
   if (tagsHash != other.tagsHash) return false;
   if (score != other.score) return false;
   if (scoredWebResult == null) {
     if (other.scoredWebResult != null) return false;
   } else if (!scoredWebResult.equals(other.scoredWebResult)) return false;
   return true;
 }
Esempio n. 4
0
 protected void addReferencedTypeDefinitions(
     WebMethod webMethod, LinkedList<Element> contextStack) {
   contextStack.push(webMethod);
   try {
     WebResult result = webMethod.getWebResult();
     this.jaxbModule
         .getJaxbContext()
         .addReferencedTypeDefinitions(
             result.isAdapted() ? result.getAdapterType() : result.getType(), contextStack);
     for (WebParam webParam : webMethod.getWebParameters()) {
       this.jaxbModule
           .getJaxbContext()
           .addReferencedTypeDefinitions(
               webParam.isAdapted() ? webParam.getAdapterType() : webParam.getType(),
               contextStack);
     }
     for (WebFault webFault : webMethod.getWebFaults()) {
       addReferencedTypeDefinitions(webFault, contextStack);
     }
   } finally {
     contextStack.pop();
   }
 }