1 package com.puppycrawl.tools.checkstyle.filters; 20 21 25 class IntMatchFilter implements IntFilter 26 { 27 28 private Integer mMatchValue; 29 30 34 public IntMatchFilter(int aMatchValue) 35 { 36 mMatchValue = new Integer (aMatchValue); 37 } 38 39 40 public boolean accept(Integer aInt) 41 { 42 return mMatchValue.equals(aInt); 43 } 44 45 46 public String toString() 47 { 48 return "IntMatchFilter[" + mMatchValue + "]"; 49 } 50 51 52 public int hashCode() 53 { 54 return mMatchValue.hashCode(); 55 } 56 57 58 public boolean equals(Object aObject) 59 { 60 if (aObject instanceof IntMatchFilter) { 61 final IntMatchFilter other = (IntMatchFilter) aObject; 62 return (this.mMatchValue).equals(other.mMatchValue); 63 } 64 return false; 65 } 66 } 67 | Popular Tags |