package de.ugoe.cs.swe.exercises.lectureevent;

import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class LectureEventLecturerContentProvider implements
		IStructuredContentProvider {

	private LectureEvent lectureEvent = null;

	public LectureEventLecturerContentProvider(LectureEvent lectureEvent) {
		this.lectureEvent = lectureEvent;
	}

	public LectureEventLecturerContentProvider() {
	}

	public void inputChanged(Viewer v, Object oldInput, Object newInput) {
	}

	public void dispose() {
	}

	public Object[] getElements(Object parent) {
		if (lectureEvent == null)
			return new Object[] {};

		return this.lectureEvent.getLecturers().toArray();
	}
}
