src/edu/kit/informatik/calendar/DayOfWeek.java
/**
     * Returns the day with the specified index.
     * 
     * <p>The specified index has to be between the {@linkplain #toIndex() index} of  {@linkplain #MONDAY} and
     * {@linkplain #SUNDAY} (inclusive).
     * 
     * @param  index the index
     * @return the month
     * @throws IllegalArgumentException if {@code index} is not the index of a day of a week
     */
Returns the day with the specified index.

The specified index has to be between the  #toIndex() index of   #MONDAY and
#SUNDAY (inclusive).

@param  index the index
@return the month
@throws IllegalArgumentException if  index is not the index of a day of a week
Returns the day with the specified index . The specified index has to be between the #toIndex () index of #MONDAY and #SUNDAY ( inclusive ) . @param index the index @return the month @throws IllegalArgumentException if index is not the index of a day of a week
public static DayOfWeek ofIndex(final int index) {
        if (index < 1 || index > DAYS.length)
            throw new IllegalArgumentException("Bad index " + index);
        return DAYS[index - 1];
    }
public static DayOfWeek ofIndex ( final int index ) { if ( index < 1 || index > DAYS . length ) throw new IllegalArgumentException ( "Bad index " + index ) ; return DAYS [ index - 1 ] ; }
Returns the day with the specified index.
Returns the day with the specified index .