Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*     */ package org.dom4j.rule;
  /*     */ 
  /*     */ import org.dom4j.Node;
  /*     */ 
  /*     */ public class Rule
  /*     */   implements Comparable
  /*     */ {
  /*     */   private String mode;
  /*     */   private int importPrecedence;
 /*     */   private double priority;
 /*     */   private int appearenceCount;
 /*     */   private Pattern pattern;
 /*     */   private Action action;
 /*     */ 
 /*     */   public Rule()
 /*     */   {
 /*  41 */     this. = 0.5D;
 /*     */   }
 /*     */ 
 /*     */   public Rule(Pattern pattern) {
 /*  45 */     this. = pattern;
 /*  46 */     this. = pattern.getPriority();
 /*     */   }
 /*     */ 
 /*     */   public Rule(Pattern patternAction action) {
 /*  50 */     this(pattern);
 /*  51 */     this. = action;
 /*     */   }
 /*     */ 
 /*     */   public Rule(Rule thatPattern pattern)
 /*     */   {
 /*  64 */     this. = that.mode;
 /*  65 */     this. = that.importPrecedence;
 /*  66 */     this. = that.priority;
 /*  67 */     this. = that.appearenceCount;
 /*  68 */     this. = that.action;
 /*  69 */     this. = pattern;
 /*     */   }
 /*     */ 
 /*     */   public boolean equals(Object that) {
 /*  73 */     if ((that instanceof Rule)) {
 /*  74 */       return compareTo((Rule)that) == 0;
 /*     */     }
 /*     */ 
 /*  77 */     return false;
 /*     */   }
 /*     */ 
 /*     */   public int hashCode() {
 /*  81 */     return this. + this.;
 /*     */   }
 /*     */ 
 /*     */   public int compareTo(Object that) {
 /*  85 */     if ((that instanceof Rule)) {
 /*  86 */       return compareTo((Rule)that);
 /*     */     }
 /*     */ 
 /*  89 */     return getClass().getName().compareTo(that.getClass().getName());
 /*     */   }
 /*     */ 
 /*     */   public int compareTo(Rule that)
 /*     */   {
 /* 102 */     int answer = this. - that.importPrecedence;
 /*     */ 
 /* 104 */     if (answer == 0) {
 /* 105 */       answer = (int)Math.round(this. - that.priority);
 /*     */ 
 /* 107 */       if (answer == 0) {
 /* 108 */         answer = this. - that.appearenceCount;
 /*     */       }
 /*     */     }
 /*     */ 
 /* 112 */     return answer;
 /*     */   }
 /*     */ 
 /*     */   public String toString() {
 /* 116 */     return super.toString() + "[ pattern: " + getPattern() + " action: " + getAction() + " ]";
 /*     */   }
 /*     */ 
 /*     */   public final boolean matches(Node node)
 /*     */   {
 /* 129 */     return this..matches(node);
 /*     */   }
 /*     */ 
 /*     */   public Rule[] getUnionRules()
 /*     */   {
 /* 141 */     Pattern[] patterns = this..getUnionPatterns();
 /*     */ 
 /* 143 */     if (patterns == null) {
 /* 144 */       return null;
 /*     */     }
 /*     */ 
 /* 147 */     int size = patterns.length;
 /* 148 */     Rule[] answer = new Rule[size];
 /*     */ 
 /* 150 */     for (int i = 0; i < sizei++) {
 /* 151 */       answer[i] = new Rule(thispatterns[i]);
 /*     */     }
 /*     */ 
 /* 154 */     return answer;
/*     */   }
/*     */ 
/*     */   public final short getMatchType()
/*     */   {
/* 164 */     return this..getMatchType();
/*     */   }
/*     */ 
/*     */   public final String getMatchesNodeName()
/*     */   {
/* 178 */     return this..getMatchesNodeName();
/*     */   }
/*     */ 
/*     */   public String getMode()
/*     */   {
/* 187 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setMode(String mode)
/*     */   {
/* 197 */     this. = mode;
/*     */   }
/*     */ 
/*     */   public int getImportPrecedence()
/*     */   {
/* 206 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setImportPrecedence(int importPrecedence)
/*     */   {
/* 216 */     this. = importPrecedence;
/*     */   }
/*     */ 
/*     */   public double getPriority()
/*     */   {
/* 225 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setPriority(double priority)
/*     */   {
/* 235 */     this. = priority;
/*     */   }
/*     */ 
/*     */   public int getAppearenceCount()
/*     */   {
/* 244 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setAppearenceCount(int appearenceCount)
/*     */   {
/* 254 */     this. = appearenceCount;
/*     */   }
/*     */ 
/*     */   public Pattern getPattern()
/*     */   {
/* 263 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setPattern(Pattern pattern)
/*     */   {
/* 273 */     this. = pattern;
/*     */   }
/*     */ 
/*     */   public Action getAction()
/*     */   {
/* 282 */     return this.;
/*     */   }
/*     */ 
/*     */   public void setAction(Action action)
/*     */   {
/* 292 */     this. = action;
/*     */   }
/*     */ }
/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/thirdparty-all.jar
 * Qualified Name:     org.dom4j.rule.Rule
 * JD-Core Version:    0.6.0
 */
New to GrepCode? Check out our FAQ X