}
}
public Collection<T> get(ModelElementInstance element) {
final ModelElementInstanceImpl modelElement = (ModelElementInstanceImpl) element;
return new Collection<T>() {
public boolean contains(Object o) {
if(o == null) {
return false;
} else if(!(o instanceof ModelElementInstanceImpl)) {
return false;
} else {
return getView(modelElement).contains(((ModelElementInstanceImpl)o).getDomElement());
}
}
public boolean containsAll(Collection<?> c) {
for (Object elementToCheck : c) {
if(!contains(elementToCheck)) {
return false;
}
}
return true;
}
public boolean isEmpty() {
return getView(modelElement).isEmpty();
}
public Iterator<T> iterator() {
Collection<T> modelElementCollection = ModelUtil.getModelElementCollection(getView(modelElement), modelElement.getModelInstance());
return modelElementCollection.iterator();
}
public Object[] toArray() {
Collection<T> modelElementCollection = ModelUtil.getModelElementCollection(getView(modelElement), modelElement.getModelInstance());
return modelElementCollection.toArray();
}
public <U> U[] toArray(U[] a) {
Collection<T> modelElementCollection = ModelUtil.getModelElementCollection(getView(modelElement), modelElement.getModelInstance());
return modelElementCollection.toArray(a);
}
public int size() {
return getView(modelElement).size();