1 24 25 package org.objectweb.dream.pushwithreturn; 26 27 import org.objectweb.dream.pool.Recyclable; 28 29 33 public class KeyInteger implements Key, Recyclable 34 { 35 36 private boolean isAll = false; 37 38 private int key = -1; 39 40 44 50 public KeyInteger(int key, boolean isAll) 51 { 52 this.key = key; 53 this.isAll = isAll; 54 } 55 56 60 63 public boolean isAll() 64 { 65 return isAll; 66 } 67 68 72 75 public void recycle() 76 { 77 isAll = false; 78 key = -1; 79 } 80 81 85 88 public boolean equals(Object obj) 89 { 90 return key == ((KeyInteger) obj).key; 91 } 92 93 96 public int hashCode() 97 { 98 return key; 99 } 100 } | Popular Tags |