View Javadoc
1   package mockit.asm.constantPool;
2   
3   import edu.umd.cs.findbugs.annotations.NonNull;
4   
5   import org.checkerframework.checker.index.qual.NonNegative;
6   
7   class IntValueItem extends Item {
8       /**
9        * Value of this item, for an integer item.
10       */
11      int intVal;
12  
13      IntValueItem(@NonNegative int index) {
14          super(index);
15      }
16  
17      IntValueItem(@NonNegative int index, @NonNull IntValueItem item) {
18          super(index, item);
19          intVal = item.intVal;
20      }
21  
22      public final void setValue(int value) {
23          intVal = value;
24          setHashCode(value);
25      }
26  
27      @Override
28      final boolean isEqualTo(@NonNull Item item) {
29          return ((IntValueItem) item).intVal == intVal;
30      }
31  }