Package net.tangly.dev.adr
Record Class Link
java.lang.Object
java.lang.Record
net.tangly.dev.adr.Link
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull String
source()
Returns the value of thesource
record component.@NotNull String
target()
Returns the value of thetarget
record component.text()
Returns the value of thetext
record component.final String
toString()
Returns a string representation of this record class.@NotNull LinkType
type()
Returns the value of thetype
record component.
-
Constructor Details
-
Link
public Link(@NotNull @NotNull String source, @NotNull @NotNull String target, @NotNull @NotNull LinkType type, String text) Creates an instance of aLink
record class.- Parameters:
source
- the value for thesource
record componenttarget
- the value for thetarget
record componenttype
- the value for thetype
record componenttext
- the value for thetext
record component
-
-
Method Details
-
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)
. -
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
target
Returns the value of thetarget
record component.- Returns:
- the value of the
target
record component
-
type
Returns the value of thetype
record component.- Returns:
- the value of the
type
record component
-
text
Returns the value of thetext
record component.- Returns:
- the value of the
text
record component
-