Record Class StorageMethod.SQLInfo

java.lang.Object
java.lang.Record
xyz.srnyx.annoyingapi.storage.StorageMethod.SQLInfo
Record Components:
url - Local: The full URL for the method
Remote: The beginning of the URL for the method
Enclosing class:
StorageMethod

public static record StorageMethod.SQLInfo(@NotNull String driver, @NotNull Function<Path,String> url, @Nullable AnnoyingLibrary library, @Nullable Integer defaultPort) extends Record
  • Constructor Details

    • SQLInfo

      public SQLInfo(@NotNull @NotNull String driver, @NotNull @NotNull Function<Path,String> url, @Nullable @Nullable AnnoyingLibrary library, @Nullable @Nullable Integer defaultPort)
      Creates an instance of a SQLInfo record class.
      Parameters:
      driver - the value for the driver record component
      url - the value for the url record component
      library - the value for the library record component
      defaultPort - the value for the defaultPort record component
  • Method Details

    • 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.
    • driver

      @NotNull public @NotNull String driver()
      Returns the value of the driver record component.
      Returns:
      the value of the driver record component
    • url

      @NotNull public @NotNull Function<Path,String> url()
      Returns the value of the url record component.
      Returns:
      the value of the url record component
    • library

      @Nullable public @Nullable AnnoyingLibrary library()
      Returns the value of the library record component.
      Returns:
      the value of the library record component
    • defaultPort

      @Nullable public @Nullable Integer defaultPort()
      Returns the value of the defaultPort record component.
      Returns:
      the value of the defaultPort record component