1 11 package org.eclipse.jdt.internal.ui.refactoring.nls.search; 12 13 import java.util.Set ; 14 15 import org.eclipse.core.runtime.Assert; 16 17 18 19 class Properties extends java.util.Properties { 20 21 private static final long serialVersionUID= 1L; 22 23 private Set fDuplicateKeys; 24 25 public Properties() { 26 } 27 28 public Properties(Set duplicateKeys) { 29 super(); 30 Assert.isNotNull(duplicateKeys); 31 fDuplicateKeys= duplicateKeys; 32 } 33 34 public Properties (Properties properties, Set duplicateKeys) { 35 super(properties); 36 Assert.isNotNull(duplicateKeys); 37 fDuplicateKeys= duplicateKeys; 38 } 39 42 public Object put(Object arg0, Object arg1) { 43 if (arg0 != null && containsKey(arg0)) 44 fDuplicateKeys.add(arg0); 45 return super.put(arg0, arg1); 46 } 47 } 48 | Popular Tags |