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 thearecord component.da()Returns the value of thedarecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()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
-