Package TelNetApplication
Record Class TelVerbindung
java.lang.Object
java.lang.Record
TelNetApplication.TelVerbindung
Klasse für eine Telefonverbindung.
Eine Telefonverbindung besteht aus Anfangsknoten u, Endknoten v und Verbindungskosten c.
- Since:
- 15.12.2023
-
Constructor Summary
ConstructorDescriptionTelVerbindung(TelKnoten u, TelKnoten v, int c)
Creates an instance of aTelVerbindung
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
c()
Returns the value of thec
record component.boolean
Indicates whether some other object is "equal to" this one.int
hashCode()
Returns a hash code value for this object.toString()
Returns a string representation of this record class.u()
Returns the value of theu
record component.v()
Returns the value of thev
record component.
-
Constructor Details
-
TelVerbindung
Creates an instance of aTelVerbindung
record class.- Parameters:
u
- the value for theu
record componentv
- the value for thev
record componentc
- the value for thec
record component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
u
Returns the value of theu
record component.- Returns:
- the value of the
u
record component
-
v
Returns the value of thev
record component.- Returns:
- the value of the
v
record component
-
c
public int c()Returns the value of thec
record component.- Returns:
- the value of the
c
record component
-