Package io.adifmcp.core.persona
Record Class Persona
java.lang.Object
java.lang.Record
io.adifmcp.core.persona.Persona
public record Persona(String id, String label, List<CallsignRange> callsigns, Map<String,ProviderFlags> providers)
extends Record
Immutable persona definition.
-
Constructor Summary
ConstructorsConstructorDescriptionPersona(String id, String label, List<CallsignRange> callsigns, Map<String, ProviderFlags> providers) Creates an instance of aPersonarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecallsignsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.label()Returns the value of thelabelrecord component.Returns the value of theprovidersrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Persona
public Persona(String id, String label, List<CallsignRange> callsigns, Map<String, ProviderFlags> providers) Creates an instance of aPersonarecord class.- Parameters:
id- the value for theidrecord componentlabel- the value for thelabelrecord componentcallsigns- the value for thecallsignsrecord componentproviders- the value for theprovidersrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
callsigns
Returns the value of thecallsignsrecord component.- Returns:
- the value of the
callsignsrecord component
-
providers
Returns the value of theprovidersrecord component.- Returns:
- the value of the
providersrecord component
-