// Path: MensaApp/src/main/java/de/lukasniemeier/mensa/utils/Utils.java
// public class Utils {
// 
//     private static final DateFormat defaultMenuDateFormat = new SimpleDateFormat("c, d.MM");
// 
//     public static String formatDate(Context context, SerializableTime time) {
//         return formatDate(context, time, defaultMenuDateFormat);
//     }
// 
//     public static String formatDate(Context context, SerializableTime time, DateFormat format) {
//         if (DateUtils.isToday(time.toMillis())) {
//             return context.getString(R.string.today);
//         } else if(DateUtils.isToday(time.toMillis() - 1000 * 60 * 60 * 24)) {
//             return context.getString(R.string.tomorrow);
//         } else {
//             return format.format(time.toDate());
//         }
//     }
// 
//     public static SerializableTime today() {
//         Calendar today = Calendar.getInstance();
//         today.set(Calendar.HOUR, 0);
//         today.set(Calendar.MINUTE, 0);
//         today.set(Calendar.SECOND, 0);
//         today.set(Calendar.MILLISECOND, 0);
//         return new SerializableTime(today.getTime());
//     }
// 
//     public static SerializableTime now() {
//         Time now = new Time();
//         now.setToNow();
//         return new SerializableTime(now);
//     }
// 
//     public static void restartApp(Activity context) {
//         Intent i = context.getBaseContext().getPackageManager().getLaunchIntentForPackage(context.getBaseContext().getPackageName());
//         i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//         context.startActivity(i);
//     }
// 
//     public static int dpToPx(Context context, int dp) {
//         float density = context.getResources().getDisplayMetrics().density;
//         return (int)(dp * density);
//     }
// 
//     private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
// 
//     /**
//      * Generate a value suitable for use in {@link android.view.View#setId(int)}.
//      * This value will not collide with ID values generated at build time by aapt for R.id.
//      *
//      * @return a generated ID value
//      */
//     public static int generateViewId() {
//         for (;;) {
//             final int result = sNextGeneratedId.get();
//             // aapt-generated IDs have the high byte nonzero; clamp to the range under that.
//             int newValue = result + 1;
//             if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.
//             if (sNextGeneratedId.compareAndSet(result, newValue)) {
//                 return result;
//             }
//         }
//     }
// }


import android.text.format.Time;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import de.lukasniemeier.mensa.utils.Utils;
    private final String openingTimes;
    private final String openingTimesOffSeason;
    private final URL detailMenuURL;

    public Mensa(String name, String address, String openingTimes, String openingTimesOffSeason, URL detailMenuURL) {
        this(name, name, address, openingTimes, openingTimesOffSeason, detailMenuURL);
    }

    public Mensa(String name, String shortName, String address, String openingTimes, String openingTimesOffSeason, URL detailMenuURL) {
        this.name = name;
        this.shortName = shortName;
        this.address = address;
        this.openingTimes = openingTimes;
        this.openingTimesOffSeason = openingTimesOffSeason;
        this.detailMenuURL = detailMenuURL;
    }

    public String getName() {
        return name;
    }

    public String getShortName() {
        return shortName;
    }

    public String getAddress() {
        return address;
    }

    public String getOpeningTimes() {
// Path: MensaApp/src/main/java/de/lukasniemeier/mensa/utils/Utils.java
// public class Utils {
// 
//     private static final DateFormat defaultMenuDateFormat = new SimpleDateFormat("c, d.MM");
// 
//     public static String formatDate(Context context, SerializableTime time) {
//         return formatDate(context, time, defaultMenuDateFormat);
//     }
// 
//     public static String formatDate(Context context, SerializableTime time, DateFormat format) {
//         if (DateUtils.isToday(time.toMillis())) {
//             return context.getString(R.string.today);
//         } else if(DateUtils.isToday(time.toMillis() - 1000 * 60 * 60 * 24)) {
//             return context.getString(R.string.tomorrow);
//         } else {
//             return format.format(time.toDate());
//         }
//     }
// 
//     public static SerializableTime today() {
//         Calendar today = Calendar.getInstance();
//         today.set(Calendar.HOUR, 0);
//         today.set(Calendar.MINUTE, 0);
//         today.set(Calendar.SECOND, 0);
//         today.set(Calendar.MILLISECOND, 0);
//         return new SerializableTime(today.getTime());
//     }
// 
//     public static SerializableTime now() {
//         Time now = new Time();
//         now.setToNow();
//         return new SerializableTime(now);
//     }
// 
//     public static void restartApp(Activity context) {
//         Intent i = context.getBaseContext().getPackageManager().getLaunchIntentForPackage(context.getBaseContext().getPackageName());
//         i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//         context.startActivity(i);
//     }
// 
//     public static int dpToPx(Context context, int dp) {
//         float density = context.getResources().getDisplayMetrics().density;
//         return (int)(dp * density);
//     }
// 
//     private static final AtomicInteger sNextGeneratedId = new AtomicInteger(1);
// 
//     /**
//      * Generate a value suitable for use in {@link android.view.View#setId(int)}.
//      * This value will not collide with ID values generated at build time by aapt for R.id.
//      *
//      * @return a generated ID value
//      */
//     public static int generateViewId() {
//         for (;;) {
//             final int result = sNextGeneratedId.get();
//             // aapt-generated IDs have the high byte nonzero; clamp to the range under that.
//             int newValue = result + 1;
//             if (newValue > 0x00FFFFFF) newValue = 1; // Roll over to 1, not 0.
//             if (sNextGeneratedId.compareAndSet(result, newValue)) {
//                 return result;
//             }
//         }
//     }
// }


// Path: MensaApp/src/main/java/de/lukasniemeier/mensa/model/Mensa.java
import android.text.format.Time;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import java.io.ObjectStreamException;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import de.lukasniemeier.mensa.utils.Utils;

    private final String openingTimes;
    private final String openingTimesOffSeason;
    private final URL detailMenuURL;

    public Mensa(String name, String address, String openingTimes, String openingTimesOffSeason, URL detailMenuURL) {
        this(name, name, address, openingTimes, openingTimesOffSeason, detailMenuURL);
    }

    public Mensa(String name, String shortName, String address, String openingTimes, String openingTimesOffSeason, URL detailMenuURL) {
        this.name = name;
        this.shortName = shortName;
        this.address = address;
        this.openingTimes = openingTimes;
        this.openingTimesOffSeason = openingTimesOffSeason;
        this.detailMenuURL = detailMenuURL;
    }

    public String getName() {
        return name;
    }

    public String getShortName() {
        return shortName;
    }

    public String getAddress() {
        return address;
    }

    public String getOpeningTimes() {
        Time now = Utils.now().getTime();