de.espirit.common.util
Enum WeekDay

java.lang.Object
  extended by java.lang.Enum<WeekDay>
      extended by de.espirit.common.util.WeekDay
All Implemented Interfaces:
Serializable, Comparable<WeekDay>

public enum WeekDay
extends Enum<WeekDay>

Days of a week: WeekDay.SUNDAY, WeekDay.MONDAY, WeekDay.TUESDAY, WeekDay.WEDNESDAY, WeekDay.THURSDAY, WeekDay.FRIDAY, and WeekDay.SATURDAY.

Since:
4.0

Enum Constant Summary
FRIDAY
          A week day.
MONDAY
          A week day.
SATURDAY
          A week day.
SUNDAY
          A week day.
THURSDAY
          A week day.
TUESDAY
          A week day.
WEDNESDAY
          A week day.
 
Method Summary
static WeekDay[] getSortedWeekDays()
          A sorted array of week days where the first week day in the returned array is locale dependent (on some locales the first day of a week is WeekDay.SUNDAY and on some it is WeekDay.MONDAY).
 String toString()
          The locale dependent name of the week day, e.g. on a french locale WeekDay.MONDAY.toString() will return "Lundi".
static WeekDay valueOf(String name)
          Returns the enum constant of this type with the specified name.
static WeekDay[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SUNDAY

public static final WeekDay SUNDAY
A week day.

Since:
4.0

MONDAY

public static final WeekDay MONDAY
A week day.

Since:
4.0

TUESDAY

public static final WeekDay TUESDAY
A week day.

Since:
4.0

WEDNESDAY

public static final WeekDay WEDNESDAY
A week day.

Since:
4.0

THURSDAY

public static final WeekDay THURSDAY
A week day.

Since:
4.0

FRIDAY

public static final WeekDay FRIDAY
A week day.

Since:
4.0

SATURDAY

public static final WeekDay SATURDAY
A week day.

Since:
4.0
Method Detail

values

public static final WeekDay[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(WeekDay c : WeekDay.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static WeekDay valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name

toString

public String toString()
The locale dependent name of the week day, e.g. on a french locale WeekDay.MONDAY.toString() will return "Lundi".

Overrides:
toString in class Enum<WeekDay>
Returns:
The locale specific week day name.
Since:
4.0

getSortedWeekDays

public static WeekDay[] getSortedWeekDays()
A sorted array of week days where the first week day in the returned array is locale dependent (on some locales the first day of a week is WeekDay.SUNDAY and on some it is WeekDay.MONDAY).

Since:
4.0


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480