+/* CourseGroup.java
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
package de.dhbwloe.campusapp.vorlesungen;
-
+import android.os.Bundle;
import android.provider.ContactsContract;
+import java.lang.reflect.Array;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import de.dhbwloe.campusapp.database.DatabaseManager;
private boolean bIsNew = false;
private ArrayList<CourseEvent> events = new ArrayList<CourseEvent>();
+ private Bundle extraData = new Bundle();
+
public static CourseGroup GetCourseGroupById(DatabaseManager dbm, int id) {
for(CourseGroup group : CourseGroups) {
if(group.iCourseGroupId == id)
return (CourseEvent[])this.events.toArray();
}
+ public CourseEvent[] getOrderedCourseEvents() {
+ CourseEvent[] events = getCourseEvents();
+
+ Arrays.sort(events);
+
+ return events;
+ }
+
public int getGroupId() {
return iCourseGroupId;
}
return ret;
}
+ public Bundle getExtraData() {
+ return extraData;
+ }
+
+ public String getGroupName() {
+ return sCourseGroupName;
+ }
+
}