Record Class InspectionResult
java.lang.Object
java.lang.Record
io.hymods.lib.data.InspectionResult
public record InspectionResult(InspectionTargetType targetType, String displayName, @NullableDecl String targetId, boolean showIcon, List<InspectionLine> lines)
extends Record
A normalized inspection payload suitable for rendering into a HUD.
-
Constructor Summary
ConstructorsConstructorDescriptionInspectionResult(InspectionTargetType targetType, String displayName, String targetId, boolean showIcon, List<InspectionLine> lines) Creates an instance of aInspectionResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanlines()Returns the value of thelinesrecord component.static InspectionResultnone()booleanshowIcon()Returns the value of theshowIconrecord component.targetId()Returns the value of thetargetIdrecord component.Returns the value of thetargetTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
InspectionResult
public InspectionResult(InspectionTargetType targetType, String displayName, @NullableDecl String targetId, boolean showIcon, List<InspectionLine> lines) Creates an instance of aInspectionResultrecord class.- Parameters:
targetType- the value for thetargetTyperecord componentdisplayName- the value for thedisplayNamerecord componenttargetId- the value for thetargetIdrecord componentshowIcon- the value for theshowIconrecord componentlines- the value for thelinesrecord component
-
-
Method Details
-
hasTarget
public boolean hasTarget() -
none
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
targetType
Returns the value of thetargetTyperecord component.- Returns:
- the value of the
targetTyperecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
targetId
Returns the value of thetargetIdrecord component.- Returns:
- the value of the
targetIdrecord component
-
showIcon
public boolean showIcon()Returns the value of theshowIconrecord component.- Returns:
- the value of the
showIconrecord component
-
lines
Returns the value of thelinesrecord component.- Returns:
- the value of the
linesrecord component
-