Package io.openems.edge.core.appmanager
Record Class ComponentUtil.RelayInfo
java.lang.Object
java.lang.Record
io.openems.edge.core.appmanager.ComponentUtil.RelayInfo
- Enclosing interface:
ComponentUtil
public static record ComponentUtil.RelayInfo(String id, String alias, int numberOfChannels, List<ComponentUtil.RelayContactInfo> channels)
extends Record
-
Constructor Summary
ConstructorDescriptionRelayInfo
(String id, String alias, int numberOfChannels, List<ComponentUtil.RelayContactInfo> channels) Creates an instance of aRelayInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptionalias()
Returns the value of thealias
record component.channels()
Returns the value of thechannels
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the alias if not blank otherwise return the id.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.int
Returns the value of thenumberOfChannels
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RelayInfo
public RelayInfo(String id, String alias, int numberOfChannels, List<ComponentUtil.RelayContactInfo> channels) Creates an instance of aRelayInfo
record class.- Parameters:
id
- the value for theid
record componentalias
- the value for thealias
record componentnumberOfChannels
- the value for thenumberOfChannels
record componentchannels
- the value for thechannels
record component
-
-
Method Details
-
getDisplayName
Returns the alias if not blank otherwise return the id.- Returns:
- the string to display
-
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 '=='. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
alias
Returns the value of thealias
record component.- Returns:
- the value of the
alias
record component
-
numberOfChannels
public int numberOfChannels()Returns the value of thenumberOfChannels
record component.- Returns:
- the value of the
numberOfChannels
record component
-
channels
Returns the value of thechannels
record component.- Returns:
- the value of the
channels
record component
-