Record Class ProxyFallback

java.lang.Object
java.lang.Record
eu.cloudnetservice.modules.bridge.config.ProxyFallback
All Implemented Interfaces:
Comparable<ProxyFallback>

public record ProxyFallback(int priority, @NonNull String task, @Nullable String permission, @Nullable String forcedHost, @Unmodifiable @NonNull Set<String> availableOnGroups) extends Record implements Comparable<ProxyFallback>
  • Field Details

    • priority

      private final int priority
      The field for the priority record component.
    • task

      @NonNull private final @NonNull String task
      The field for the task record component.
    • permission

      @Nullable private final @Nullable String permission
      The field for the permission record component.
    • forcedHost

      @Nullable private final @Nullable String forcedHost
      The field for the forcedHost record component.
    • availableOnGroups

      @NonNull private final @Unmodifiable @NonNull Set<String> availableOnGroups
      The field for the availableOnGroups record component.
  • Constructor Details

    • ProxyFallback

      public ProxyFallback(int priority, @NonNull @NonNull String task, @Nullable @Nullable String permission, @Nullable @Nullable String forcedHost, @NonNull @Unmodifiable @NonNull Set<String> availableOnGroups)
      Creates an instance of a ProxyFallback record class.
      Parameters:
      priority - the value for the priority record component
      task - the value for the task record component
      permission - the value for the permission record component
      forcedHost - the value for the forcedHost record component
      availableOnGroups - the value for the availableOnGroups record component
  • Method Details

    • builder

      @NonNull public static @NonNull ProxyFallback.Builder builder()
    • builder

    • compareTo

      public int compareTo(@NonNull @NonNull ProxyFallback o)
      Specified by:
      compareTo in interface Comparable<ProxyFallback>
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • priority

      public int priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • task

      @NonNull public @NonNull String task()
      Returns the value of the task record component.
      Returns:
      the value of the task record component
    • permission

      @Nullable public @Nullable String permission()
      Returns the value of the permission record component.
      Returns:
      the value of the permission record component
    • forcedHost

      @Nullable public @Nullable String forcedHost()
      Returns the value of the forcedHost record component.
      Returns:
      the value of the forcedHost record component
    • availableOnGroups

      @NonNull public @Unmodifiable @NonNull Set<String> availableOnGroups()
      Returns the value of the availableOnGroups record component.
      Returns:
      the value of the availableOnGroups record component