This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
android-app/src/com/studentersamfundet/app/DataHandler.java
T
2011-09-14 16:37:07 +02:00

30 lines
592 B
Java

package com.studentersamfundet.app;
public class DataHandler {
Event events;
void insert(String id, String title, String description, String date, String location, String category) {
int intId = Integer.parseInt(id);
if (get(intId) != null)
return;
Event e = new Event(intId, title, description, date, location, category);
if (events == null)
events = e;
else {
Event tmp = events;
while (tmp.next != null)
tmp = tmp.next;
tmp.next = e;
}
}
Event get(int id) {
Event e = events;
while (e != null && e.id != id)
e = e.next;
return e;
}
}