prog.utili
Enum GiornoDellaSettimana

java.lang.Object
  extended by java.lang.Enum<GiornoDellaSettimana>
      extended by prog.utili.GiornoDellaSettimana
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<GiornoDellaSettimana>

public enum GiornoDellaSettimana
extends java.lang.Enum<GiornoDellaSettimana>

Gli oggetti di questo tipo enumerativo rappresentano i giorni della settimana.

Version:
2.0
Author:
Mauro Ferrari, Giovanni Pighizzini

Enum Constant Summary
DOMENICA
           
GIOVEDI
           
LUNEDI
           
MARTEDI
           
MERCOLEDI
           
SABATO
           
VENERDI
           
 
Method Summary
static GiornoDellaSettimana getGiorno(Data d)
          Restituisce il giorno della settimana corrispondente alla data fornita come argomento.
 GiornoDellaSettimana precedente()
          Restituisce il riferimento all'oggetto che rappresenta il giorno precedente a quello che esegue il metodo.
 GiornoDellaSettimana successivo()
          Restituisce il riferimento all'oggetto che rappresenta il giorno successivo a quello che esegue il metodo.
 java.lang.String toString()
           
static GiornoDellaSettimana valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static GiornoDellaSettimana[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

LUNEDI

public static final GiornoDellaSettimana LUNEDI

MARTEDI

public static final GiornoDellaSettimana MARTEDI

MERCOLEDI

public static final GiornoDellaSettimana MERCOLEDI

GIOVEDI

public static final GiornoDellaSettimana GIOVEDI

VENERDI

public static final GiornoDellaSettimana VENERDI

SABATO

public static final GiornoDellaSettimana SABATO

DOMENICA

public static final GiornoDellaSettimana DOMENICA
Method Detail

values

public static final GiornoDellaSettimana[] 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(GiornoDellaSettimana c : GiornoDellaSettimana.values())
        System.out.println(c);

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

valueOf

public static GiornoDellaSettimana valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Enum<GiornoDellaSettimana>

successivo

public GiornoDellaSettimana successivo()
Restituisce il riferimento all'oggetto che rappresenta il giorno successivo a quello che esegue il metodo.

Returns:
il giorno successivo a quello che esegue il metodo.

precedente

public GiornoDellaSettimana precedente()
Restituisce il riferimento all'oggetto che rappresenta il giorno precedente a quello che esegue il metodo.

Returns:
il giorno precedente a quello che esegue il metodo.

getGiorno

public static GiornoDellaSettimana getGiorno(Data d)
Restituisce il giorno della settimana corrispondente alla data fornita come argomento.

Parameters:
d - la data di cui si vuole stabilire il giorno.