1 19 20 package org.netbeans.modules.java.bridge; 21 22 import java.util.ArrayList ; 23 import java.util.Arrays ; 24 import java.util.List ; 25 26 import org.openide.src.Element; 27 import org.openide.src.Identifier; 28 29 38 abstract class IdentifierArrayProperty extends FlyweightIndexedProperty { 39 42 static final Identifier[] EMPTY = new Identifier[0]; 43 44 46 public IdentifierArrayProperty(String propName) { 47 super(propName); 48 } 49 50 52 protected final Object [] createValue(int size) { 53 return size == 0 ? EMPTY : new Identifier[size]; 54 } 55 56 protected final Object [] createEmpty() { 57 return EMPTY; 58 } 59 60 protected boolean compareValues(Object one, Object two) { 61 Identifier id1 = (Identifier)one; 63 Identifier id2 = (Identifier)two; 64 65 return MemberElementImpl.compareSourceIdentifiers(id1, id2); 66 } 67 68 protected boolean compareValuesForRemove(Object one, Object two) { 69 Identifier id1 = (Identifier)one; 70 Identifier id2 = (Identifier)two; 71 return id1.compareTo(id2, false); 72 } 73 } 74 75 | Popular Tags |