All Downloads are FREE. Search and download functionalities are using the official Maven repository.

dhbw.timetable.rablabla.data.BaseURL Maven / Gradle / Ivy

There is a newer version: 0.3.3
Show newest version
package dhbw.timetable.rablabla.data;

/**
 * Created by Hendrik Ulbrich (C) 2017
 */
public enum BaseURL {

    STUTTGART("stuttgart"), KARLSRUHE("karlsruhe"), MANNHEIM("mannheim");

    private final String text;

    /**
     * @param text stuttgart, karlaruhe or mannheim
     */
    private BaseURL(final String text) {
        this.text = text;
    }

    public static String getRegex() {
        StringBuilder sb = new StringBuilder();
        sb.append("(");
        for (BaseURL burl : BaseURL.values()) {
            sb.append(burl).append("|");
        }
        sb.append(")");
        return sb.toString();
    }

    public String complete() {
        return "https://rapla.dhbw-" + text + ".de/rapla";
    }

    /* (non-Javadoc)
     * @see java.lang.Enum#toString()
     */
    @Override
    public String toString() {
        return text;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy