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   public class LongValueItem extends Item {
8       /**
9        * Value of this item, for a long item.
10       */
11      long longVal;
12  
13      LongValueItem(@NonNegative int index) {
14          super(index);
15      }
16  
17      LongValueItem(@NonNegative int index, @NonNull LongValueItem item) {
18          super(index, item);
19          longVal = item.longVal;
20      }
21  
22      public final void setValue(long value) {
23          longVal = value;
24          setHashCode((int) value);
25      }
26  
27      @Override
28      final boolean isEqualTo(@NonNull Item item) {
29          return ((LongValueItem) item).longVal == longVal;
30      }
31  }