Record Class Cambi.Tasso
java.lang.Object
java.lang.Record
it.unimi.di.prog2.temisvolti.cambiavalute.Cambi.Tasso
- Record Components:
da
- l'importo di partenza.a
- l'importo di arrivo.
- Enclosing class:
Cambi
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiona()
Returns the value of thea
record component.da()
Returns the value of theda
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.
-
Field Details
-
da
-
a
-
-
Constructor Details
-
Tasso
Crea un nuovo tasso di cambio.- Parameters:
da
- l'importo di partenza.a
- l'importo di arrivo- Throws:
NullPointerException
- se uno dei due importi ènull
.IllegalArgumentException
- se uno dei due importi non è positivo o se i due importi sono nella stessa valuta.
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
da
-
a
-