Record Class AvailabilityDecision
java.lang.Object
java.lang.Record
org.praxisplatform.uischema.capability.AvailabilityDecision
public record AvailabilityDecision(boolean allowed, String reason, Map<String,Object> metadata)
extends Record
Resultado canonicamente serializavel de uma avaliacao de disponibilidade.
-
Constructor Summary
ConstructorsConstructorDescriptionAvailabilityDecision(boolean allowed, String reason, Map<String, Object> metadata) Creates an instance of aAvailabilityDecisionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic AvailabilityDecisionstatic AvailabilityDecisionallowAll()booleanallowed()Returns the value of theallowedrecord component.static AvailabilityDecisionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AvailabilityDecision
Creates an instance of aAvailabilityDecisionrecord class.- Parameters:
allowed- the value for theallowedrecord componentreason- the value for thereasonrecord componentmetadata- the value for themetadatarecord component
-
-
Method Details
-
allowAll
-
allow
-
deny
-
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 '=='. -
allowed
public boolean allowed()Returns the value of theallowedrecord component.- Returns:
- the value of the
allowedrecord component
-
reason
Returns the value of thereasonrecord component.- Returns:
- the value of the
reasonrecord component
-
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-