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