|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<MeseDellAnno>
prog.utili.MeseDellAnno
public enum MeseDellAnno
Gli oggetti di questo tipo enumerativo rappresentano i mesi dell'anno.
Enum Constant Summary | |
---|---|
AGOSTO
|
|
APRILE
|
|
DICEMBRE
|
|
FEBBRAIO
|
|
GENNAIO
|
|
GIUGNO
|
|
LUGLIO
|
|
MAGGIO
|
|
MARZO
|
|
NOVEMBRE
|
|
OTTOBRE
|
|
SETTEMBRE
|
Method Summary | |
---|---|
static MeseDellAnno |
getMese(Data d)
Restituisce il MeseDellAnno corrispondente alla data
specificata come argomento. |
static MeseDellAnno |
getMese(int m)
Restituisce il MeseDellAnno corrispondente al numero
specificato come argomento. |
int |
numeroGiorni()
Restituisce il numero dei giorni del mese (28 se l'oggetto che esegue il metodo è FEBBRAIO ). |
int |
numeroGiorni(boolean bisestile)
Restituisce il numero dei giorni del mese; nel caso di febbraio, se l'argomento è true restituisce 29, se è false
restituisce 28. |
int |
numeroGiorni(int anno)
Restituisce il numero dei giorni del mese, relativamente all'anno specificato come argomento. |
MeseDellAnno |
precedente()
Restituisce il riferimento all'oggetto che rappresenta il mese precedente a quello che esegue il metodo. |
MeseDellAnno |
successivo()
Restituisce il riferimento all'oggetto che rappresenta il mese successivo a quello che esegue il metodo. |
java.lang.String |
toString()
|
static MeseDellAnno |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static MeseDellAnno[] |
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 |
---|
public static final MeseDellAnno GENNAIO
public static final MeseDellAnno FEBBRAIO
public static final MeseDellAnno MARZO
public static final MeseDellAnno APRILE
public static final MeseDellAnno MAGGIO
public static final MeseDellAnno GIUGNO
public static final MeseDellAnno LUGLIO
public static final MeseDellAnno AGOSTO
public static final MeseDellAnno SETTEMBRE
public static final MeseDellAnno OTTOBRE
public static final MeseDellAnno NOVEMBRE
public static final MeseDellAnno DICEMBRE
Method Detail |
---|
public static final MeseDellAnno[] values()
for(MeseDellAnno c : MeseDellAnno.values()) System.out.println(c);
public static MeseDellAnno valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic int numeroGiorni()
FEBBRAIO
).
public int numeroGiorni(int anno)
anno
- l'anno rispetto al quale si vogliono determinare i giorni del
mese.
public int numeroGiorni(boolean bisestile)
true
restituisce 29, se è false
restituisce 28.
bisestile
- true
per indicare che l'anno è bisestile.
public MeseDellAnno successivo()
DICEMBRE
è quello corrispondente a GENNAIO
.
public MeseDellAnno precedente()
GENNAIO
è quello corrispondente a DICEMBRE
.
public java.lang.String toString()
toString
in class java.lang.Enum<MeseDellAnno>
public static MeseDellAnno getMese(int m)
MeseDellAnno
corrispondente al numero
specificato come argomento.
public static MeseDellAnno getMese(Data d)
MeseDellAnno
corrispondente alla data
specificata come argomento.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |