Record Class DeprecatedProperty
java.lang.Object
java.lang.Record
com.patbaumgartner.spring.migrator.core.DeprecatedProperty
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecatedProperty(String key, String replacement, String reason) Creates an instance of aDeprecatedPropertyrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleankey()Returns the value of thekeyrecord component.reason()Returns the value of thereasonrecord component.Returns the value of thereplacementrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
DeprecatedProperty
Creates an instance of aDeprecatedPropertyrecord class.- Parameters:
key- the value for thekeyrecord componentreplacement- the value for thereplacementrecord componentreason- the value for thereasonrecord component
-
-
Method Details
-
hasReplacement
public boolean hasReplacement() -
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). -
key
Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
replacement
Returns the value of thereplacementrecord component.- Returns:
- the value of the
replacementrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-