1 17 package org.eclipse.emf.common.util; 18 19 20 import java.util.Collection ; 21 22 23 26 public class UniqueEList extends BasicEList 27 { 28 31 public UniqueEList() 32 { 33 super(); 34 } 35 36 41 public UniqueEList(int initialCapacity) 42 { 43 super(initialCapacity); 44 } 45 46 50 public UniqueEList(Collection collection) 51 { 52 super(collection.size()); 53 addAll(collection); 54 } 55 56 60 protected boolean isUnique() 61 { 62 return true; 63 } 64 65 68 public static class FastCompare extends UniqueEList 69 { 70 73 public FastCompare() 74 { 75 super(); 76 } 77 78 83 public FastCompare(int initialCapacity) 84 { 85 super(initialCapacity); 86 } 87 88 92 public FastCompare(Collection collection) 93 { 94 super(collection.size()); 95 addAll(collection); 96 } 97 98 102 protected boolean useEquals() 103 { 104 return false; 105 } 106 } 107 } 108 | Popular Tags |