Refine search
public boolean isEmpty(EStructuralFeature feature) { 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())) { return false; } } return true; }
public boolean isEmpty(EStructuralFeature feature) { 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())) { return false; } } return true; }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
protected int entryIndex(EStructuralFeature feature, int index) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int count = 0; int result = size; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (index == count) { return i; } ++count; result = i + 1; } } if (index == count) { return result; } else { throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); } }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
protected int entryIndex(EStructuralFeature feature, int index) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int count = 0; int result = size; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (index == count) { return i; } ++count; result = i + 1; } } if (index == count) { return result; } else { throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); } }
public boolean retainAll(EStructuralFeature feature, Collection<?> collection) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> entryCollection = new BasicEList<Entry>(collection.size()); Entry [] entries = (Entry[])data; for (int i = size; --i >= 0; ) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (!collection.contains(isFeatureMap ? entry : entry.getValue())) { entryCollection.add(entry); } } } return removeAll(entryCollection); }
public boolean retainAll(EStructuralFeature feature, Collection<?> collection) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> entryCollection = new BasicEList<Entry>(collection.size()); Entry [] entries = (Entry[])data; for (int i = size; --i >= 0; ) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (!collection.contains(isFeatureMap ? entry : entry.getValue())) { entryCollection.add(entry); } } } return removeAll(entryCollection); }
public void unset(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> removals = null; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (removals == null) { removals = new BasicEList<Entry>(); } removals.add(entry); } } if (removals != null) { removeAll(removals); } }
public void unset(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> removals = null; Entry [] entries = (Entry[])data; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (removals == null) { removals = new BasicEList<Entry>(); } removals.add(entry); } } if (removals != null) { removeAll(removals); } }
public boolean retainAll(EStructuralFeature feature, Collection<?> collection) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> entryCollection = new BasicEList<Entry>(collection.size()); for (int i = delegateSize(); --i >= 0; ) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { if (!collection.contains(isFeatureMap ? entry : entry.getValue())) { entryCollection.add(entry); } } } return removeAll(entryCollection); }
public boolean isEmpty(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); for (int i = 0, size = delegateSize(); i < size; ++i) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { return false; } } return true; }
public boolean retainAll(EStructuralFeature feature, Collection<?> collection) { boolean isFeatureMap = FeatureMapUtil.isFeatureMap(feature); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> entryCollection = new BasicEList<Entry>(collection.size()); for (int i = delegateSize(); --i >= 0; ) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { if (!collection.contains(isFeatureMap ? entry : entry.getValue())) { entryCollection.add(entry); } } } return removeAll(entryCollection); }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; for (int i = 0, size = delegateSize(); i < size; ++i) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }
public boolean isEmpty(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); for (int i = 0, size = delegateSize(); i < size; ++i) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { return false; } } return true; }
protected Object[] toArray(EStructuralFeature feature, boolean resolve) { List<Object> result = new BasicEList<Object>(); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; if (FeatureMapUtil.isFeatureMap(feature)) { for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { result.add(entry); } } } else { for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { Object value = entry.getValue(); result.add(resolve ? resolveProxy(feature, i, result.size(), value) : value); } } } return result.toArray(); }
public Object remove(EStructuralFeature feature, int index) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; int count = 0; for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (count == index) { remove(i); return FeatureMapUtil.isFeatureMap(feature) ? entry : entry.getValue(); } ++count; } } throw new IndexOutOfBoundsException("index=" + index + ", size=" + count); }
protected Object[] toArray(EStructuralFeature feature, boolean resolve) { List<Object> result = new BasicEList<Object>(); FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); Entry [] entries = (Entry[])data; if (FeatureMapUtil.isFeatureMap(feature)) { for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { result.add(entry); } } } else { for (int i = 0; i < size; ++i) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { Object value = entry.getValue(); result.add(resolve ? resolveProxy(feature, i, result.size(), value) : value); } } } return result.toArray(); }
public boolean removeAll(EStructuralFeature feature, Collection<?> collection) { if (FeatureMapUtil.isFeatureMap(feature)) { return removeAll(collection); } else { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); List<Entry> entryCollection = new BasicEList<Entry>(collection.size()); Entry [] entries = (Entry[])data; for (int i = size; --i >= 0; ) { Entry entry = entries[i]; if (validator.isValid(entry.getEStructuralFeature())) { if (collection.contains(entry.getValue())) { entryCollection.add(entry); } } } return removeAll(entryCollection); } }
public int size(EStructuralFeature feature) { FeatureMapUtil.Validator validator = FeatureMapUtil.getValidator(owner.eClass(), feature); int result = 0; for (int i = 0, size = delegateSize(); i < size; ++i) { Entry entry = delegateGet(i); if (validator.isValid(entry.getEStructuralFeature())) { ++result; } } return result; }