Record Class CloudSubjectReference

java.lang.Object
java.lang.Record
eu.cloudnetservice.modules.cloudperms.sponge.service.CloudSubjectReference
All Implemented Interfaces:
org.spongepowered.api.service.permission.SubjectReference

public record CloudSubjectReference(@NonNull String collectionIdentifier, @NonNull String subjectIdentifier, @NonNull org.spongepowered.api.service.permission.PermissionService permsService) extends Record implements org.spongepowered.api.service.permission.SubjectReference
  • Field Details

    • collectionIdentifier

      @NonNull private final @NonNull String collectionIdentifier
      The field for the collectionIdentifier record component.
    • subjectIdentifier

      @NonNull private final @NonNull String subjectIdentifier
      The field for the subjectIdentifier record component.
    • permsService

      @NonNull private final @NonNull org.spongepowered.api.service.permission.PermissionService permsService
      The field for the permsService record component.
  • Constructor Details

    • CloudSubjectReference

      public CloudSubjectReference(@NonNull @NonNull String collectionIdentifier, @NonNull @NonNull String subjectIdentifier, @NonNull @NonNull org.spongepowered.api.service.permission.PermissionService permsService)
      Creates an instance of a CloudSubjectReference record class.
      Parameters:
      collectionIdentifier - the value for the collectionIdentifier record component
      subjectIdentifier - the value for the subjectIdentifier record component
      permsService - the value for the permsService record component
  • Method Details

    • resolve

      public CompletableFuture<? extends org.spongepowered.api.service.permission.Subject> resolve()
      Specified by:
      resolve in interface org.spongepowered.api.service.permission.SubjectReference
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • collectionIdentifier

      @NonNull public @NonNull String collectionIdentifier()
      Returns the value of the collectionIdentifier record component.
      Specified by:
      collectionIdentifier in interface org.spongepowered.api.service.permission.SubjectReference
      Returns:
      the value of the collectionIdentifier record component
    • subjectIdentifier

      @NonNull public @NonNull String subjectIdentifier()
      Returns the value of the subjectIdentifier record component.
      Specified by:
      subjectIdentifier in interface org.spongepowered.api.service.permission.SubjectReference
      Returns:
      the value of the subjectIdentifier record component
    • permsService

      @NonNull public @NonNull org.spongepowered.api.service.permission.PermissionService permsService()
      Returns the value of the permsService record component.
      Returns:
      the value of the permsService record component