1 21 22 package org.apache.derby.iapi.services.classfile; 23 24 import org.apache.derby.iapi.services.classfile.VMDescriptor; 25 26 import java.io.IOException ; 27 28 29 final class CONSTANT_Double_info extends ConstantPoolEntry { 30 private final double value; 31 32 CONSTANT_Double_info(double value) { 33 super(VMDescriptor.CONSTANT_Double); 34 doubleSlot = true; this.value = value; 36 } 37 38 public int hashCode() { 39 return (int) value; 40 } 41 42 int classFileSize() { 43 return 1 + 8; 45 } 46 void put(ClassFormatOutput out) throws IOException { 47 super.put(out); 48 out.writeDouble(value); 49 } 50 51 public boolean equals(Object other) { 52 53 if (other instanceof CONSTANT_Double_info) { 55 56 return value == ((CONSTANT_Double_info) other).value; 57 } 58 59 return false; 60 } 61 } 62 63 64 | Popular Tags |