Package de.z0rdak.yawp.core.flag
Record Class FlagCorrelation
java.lang.Object
java.lang.Record
de.z0rdak.yawp.core.flag.FlagCorrelation
- Record Components:
region- the region responsible for the resolved flag state, must not benullflag- the flag associated with the resolved state, may benullif undefined
Represents the resolved association between a region and a flag.
This class determines which region is responsible for a specific flag state. The responsible region may not always be the one directly involved in a flag check event; it could be an ancestor region that overrides the flag state of a child region.
FlagCorrelation is primarily used for passing information in recursive flag evaluations
and retaining flag resolution details for use in the CLI.
-
Constructor Summary
ConstructorsConstructorDescriptionFlagCorrelation(IProtectedRegion region, @Nullable IFlag flag) Creates an instance of aFlagCorrelationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable IFlagflag()Returns the value of theflagrecord component.final inthashCode()Returns a hash code value for this object.region()Returns the value of theregionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
region
Returns the value of theregionrecord component.- Returns:
- the value of the
regionrecord component
-
flag
Returns the value of theflagrecord component.- Returns:
- the value of the
flagrecord component
-