public Object setValue(int index, Object value) { return set(index, createEntry(getEStructuralFeature(index), value)).getValue(); }
public Object setValue(int index, Object value) { return set(index, createEntry(getEStructuralFeature(index), value)).getValue(); }
Entry entry = createEntry(feature, object); entryCollection.add(entry); Entry entry = createEntry(feature, object); entryCollection.add(entry); Entry entry = createEntry(feature, collection.iterator().next()); entryCollection.add(entry);
Entry entry = createEntry(feature, object); if (!entryCollection.contains(entry)) Entry entry = createEntry(feature, object); entryCollection.add(entry); doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object)); Entry entry = createEntry(feature, collection.iterator().next()); entryCollection.add(entry);
Entry entry = createEntry(feature, object); entryCollection.add(entry); Entry entry = createEntry(feature, object); entryCollection.add(entry); Entry entry = createEntry(feature, collection.iterator().next()); entryCollection.add(entry);
public void add(int index, EStructuralFeature feature, Object object) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); if (isMany(feature)) { if (feature.isUnique() && contains(feature, object)) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } else { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (isFeatureMap ? entry.equals(object) : object == null ? entry.getValue() == null : object.equals(entry.getValue())) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } } } doAdd(index, isFeatureMap ? (Entry)object : createEntry(feature, object)); }
public void add(int index, EStructuralFeature feature, Object object) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); if (isMany(feature)) { if (feature.isUnique() && contains(feature, object)) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } else { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (isFeatureMap ? entry.equals(object) : object == null ? entry.getValue() == null : object.equals(entry.getValue())) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } } } doAdd(index, isFeatureMap ? (Entry)object : createEntry(feature, object)); }
doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object)); return true; return doAdd(isFeatureMap ? (Entry)object : createEntry(feature, object));
doSet(i, isFeatureMap ? (Entry)object : createEntry(feature, object)); return true; return doAdd(isFeatureMap ? (Entry)object : createEntry(feature, object));
public void add(EStructuralFeature feature, int index, Object object) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); if (isMany(feature)) { if (feature.isUnique() && contains(feature, object)) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } else { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { throw new IllegalArgumentException("The multiplicity constraint is violated"); } } } doAdd(entryIndex(feature, index), isFeatureMap ? (Entry)object : createEntry(feature, object)); }
return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object)); if (validator.isValid(entry.getEStructuralFeature())) return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));
public void add(EStructuralFeature feature, int index, Object object) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); if (isMany(feature)) { if (feature.isUnique() && contains(feature, object)) { throw new IllegalArgumentException("The 'no duplicates' constraint is violated"); } } else { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { throw new IllegalArgumentException("The multiplicity constraint is violated"); } } } doAdd(entryIndex(feature, index), isFeatureMap ? (Entry)object : createEntry(feature, object)); }
return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object)); if (validator.isValid(entry.getEStructuralFeature())) return setUnique(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));
return doSet(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));
return doSet(i, FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object));
public Object resolveProxy(EStructuralFeature feature, int entryIndex, int index, Object object) { EObject resolved = resolveProxy((EObject)object); if (resolved != object) { Entry oldObject = (Entry)data[entryIndex]; Entry entry = createEntry(feature, resolved); assign(entryIndex, validate(entryIndex, entry)); didSet(entryIndex, entry, oldObject); if (isNotificationRequired()) { NotificationImpl notifications = createNotification (Notification.RESOLVE, entry.getEStructuralFeature(), object, resolved, index, false); notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false)); notifications.dispatch(); } return resolved; } return object; }
public Object resolveProxy(EStructuralFeature feature, int entryIndex, int index, Object object) { EObject resolved = resolveProxy((EObject)object); if (resolved != object) { Entry oldObject = (Entry)data[entryIndex]; Entry entry = createEntry(feature, resolved); assign(entryIndex, validate(entryIndex, entry)); didSet(entryIndex, entry, oldObject); if (isNotificationRequired()) { NotificationImpl notifications = createNotification (Notification.RESOLVE, entry.getEStructuralFeature(), object, resolved, index, false); notifications.add(createNotification(Notification.RESOLVE, oldObject, entry, index, false)); notifications.dispatch(); } return resolved; } return object; }
Entry entry = FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object);
Entry entry = FeatureMapUtil.isFeatureMap(feature) ? (Entry)object : createEntry(feature, object);
if (resolved != object) Entry newEntry = createEntry(feature, resolved); assign(index, validate(index, newEntry)); didSet(index, newEntry, entry);