Record Class ChannelVersionChange
java.lang.Object
java.lang.Record
org.wildfly.prospero.api.ChannelVersionChange
public record ChannelVersionChange(String channelName, ChannelVersion oldVersion, ChannelVersion newVersion)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionChannelVersionChange(String channelName, ChannelVersion oldVersion, ChannelVersion newVersion) Creates an instance of aChannelVersionChangerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thechannelNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if the channel change represents a downgrade - i.e. attempt to install a lower version manifest.Returns the value of thenewVersionrecord component.Returns the value of theoldVersionrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
ChannelVersionChange
public ChannelVersionChange(String channelName, ChannelVersion oldVersion, ChannelVersion newVersion) Creates an instance of aChannelVersionChangerecord class.- Parameters:
channelName- the value for thechannelNamerecord componentoldVersion- the value for theoldVersionrecord componentnewVersion- the value for thenewVersionrecord component
-
-
Method Details
-
isDowngrade
public boolean isDowngrade()Checks if the channel change represents a downgrade - i.e. attempt to install a lower version manifest. NOTE: the "downgrade" concept only makes sense for Maven backed channels. In all other channels this method always return "false"- Returns:
-
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). -
channelName
Returns the value of thechannelNamerecord component.- Returns:
- the value of the
channelNamerecord component
-
oldVersion
Returns the value of theoldVersionrecord component.- Returns:
- the value of the
oldVersionrecord component
-
newVersion
Returns the value of thenewVersionrecord component.- Returns:
- the value of the
newVersionrecord component
-