Enum Class Valuta
- All Implemented Interfaces:
Serializable, Comparable<Valuta>, Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E>
-
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontoString()
static Valuta
valueOf
(char simbolo) Consente di ottenere una valuta dato il suo simbolo.static Valuta
Returns the enum constant of this class with the specified name.static Valuta[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
USD
Dollari. -
EUR
Euro. -
CHF
Franco. -
TRY
Lira. -
INR
Rupia. -
GBP
Sterlina. -
JPY
Yen.
-
-
Field Details
-
ENUM_MAP
-
nome
Il nome della valuta (non può esserenull
, o vuoto). -
simbolo
public final char simboloIl simbolo della valuta.
-
-
Constructor Details
-
Valuta
Costruttore privato.- Parameters:
nome
- il nome della valuta.simbolo
- il simbolo della valuta.- Throws:
NullPointerException
- se il nome ènull
.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
valueOf
Consente di ottenere una valuta dato il suo simbolo.- Parameters:
simbolo
- il simbolo della valuta da cercare.- Returns:
- la valuta.
- Throws:
IllegalArgumentException
- se il simbolo non corrisponde ad alcuna valuta nota.
-
toString
-