View Javadoc
1   package mockit.asm.constantPool;
2   
3   import static mockit.asm.jvmConstants.ConstantPoolTypes.DOUBLE;
4   
5   import edu.umd.cs.findbugs.annotations.NonNull;
6   
7   import org.checkerframework.checker.index.qual.NonNegative;
8   
9   public final class DoubleItem extends LongValueItem {
10      public DoubleItem(@NonNegative int index) {
11          super(index);
12          type = DOUBLE;
13      }
14  
15      DoubleItem(@NonNegative int index, @NonNull DoubleItem item) {
16          super(index, item);
17      }
18  
19      /**
20       * Sets the value of this item.
21       */
22      public void set(double value) {
23          long longValue = Double.doubleToRawLongBits(value);
24          setValue(longValue);
25      }
26  }