Record Class SecurityPolicy
java.lang.Object
java.lang.Record
com.refinedmods.refinedstorage.api.network.security.SecurityPolicy
@API(status=STABLE,
since="2.0.0-milestone.3.5")
public record SecurityPolicy(Set<Permission> allowedPermissions)
extends Record
-
Constructor Summary
ConstructorDescriptionSecurityPolicy
(Set<Permission> allowedPermissions) Creates an instance of aSecurityPolicy
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theallowedPermissions
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.boolean
isAllowed
(Permission permission) static SecurityPolicy
of
(Permission... permissions) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
SecurityPolicy
Creates an instance of aSecurityPolicy
record class.- Parameters:
allowedPermissions
- the value for theallowedPermissions
record component
-
-
Method Details
-
of
-
isAllowed
-
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)
. -
allowedPermissions
Returns the value of theallowedPermissions
record component.- Returns:
- the value of the
allowedPermissions
record component
-