Package com.tnsai.norms
Record Class NormEntry
java.lang.Object
java.lang.Record
com.tnsai.norms.NormEntry
public record NormEntry(com.tnsai.annotations.NormType type, String condition, String action, String description, int priority)
extends Record
Runtime representation of a norm extracted from annotations.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.Returns the value of theconditionrecord component.Returns the value of thedescriptionrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanReturns true if this norm has a condition expression.final inthashCode()Returns a hash code value for this object.intpriority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.com.tnsai.annotations.NormTypetype()Returns the value of thetyperecord component.
-
Constructor Details
-
NormEntry
public NormEntry(com.tnsai.annotations.NormType type, String condition, String action, String description, int priority) Creates an instance of aNormEntryrecord class.- Parameters:
type- the value for thetyperecord componentcondition- the value for theconditionrecord componentaction- the value for theactionrecord componentdescription- the value for thedescriptionrecord componentpriority- the value for thepriorityrecord component
-
-
Method Details
-
hasCondition
public boolean hasCondition()Returns true if this norm has a condition expression. -
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 '=='. -
type
public com.tnsai.annotations.NormType type()Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
condition
Returns the value of theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-
description
Returns the value of thedescriptionrecord component.- Returns:
- the value of the
descriptionrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-