1 11 package org.eclipse.jdt.internal.corext.refactoring.typeconstraints2; 12 13 import org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.ArrayType; 14 15 16 public final class ArrayElementVariable2 extends ConstraintVariable2 { 17 18 private final ConstraintVariable2 fParentCv; 19 20 public ArrayElementVariable2(ConstraintVariable2 parentCv) { 21 super(((ArrayType) parentCv.getType()).getComponentType()); 22 fParentCv= parentCv; 23 } 24 25 28 public int hashCode() { 29 return fParentCv.hashCode(); 30 } 31 32 35 public boolean equals(Object other) { 36 if (this == other) 37 return true; 38 if (other.getClass() != ArrayElementVariable2.class) 39 return false; 40 41 ArrayElementVariable2 other2= (ArrayElementVariable2) other; 42 return fParentCv == other2.fParentCv; 43 } 44 45 } 46 | Popular Tags |