Record Class Instance

java.lang.Object
java.lang.Record
org.mastodon4j.core.api.entities.Instance

public record Instance(String domain, String title, String version, String source_url, String description, Instance.Usage usage, Instance.Thumbnail thumbnail, List<String> languages, Instance.Configuration configuration, Instance.Registrations registrations, Instance.Contact contact, List<Rule> rules) extends Record
  • Constructor Details

    • Instance

      public Instance(String domain, String title, String version, String source_url, String description, Instance.Usage usage, Instance.Thumbnail thumbnail, List<String> languages, Instance.Configuration configuration, Instance.Registrations registrations, Instance.Contact contact, List<Rule> rules)
      Creates an instance of a Instance record class.
      Parameters:
      domain - the value for the domain record component
      title - the value for the title record component
      version - the value for the version record component
      source_url - the value for the source_url record component
      description - the value for the description record component
      usage - the value for the usage record component
      thumbnail - the value for the thumbnail record component
      languages - the value for the languages record component
      configuration - the value for the configuration record component
      registrations - the value for the registrations record component
      contact - the value for the contact record component
      rules - the value for the rules 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.
    • domain

      public String domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • title

      public String title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • version

      public String version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • source_url

      public String source_url()
      Returns the value of the source_url record component.
      Returns:
      the value of the source_url record component
    • description

      public String description()
      Returns the value of the description record component.
      Returns:
      the value of the description record component
    • usage

      public Instance.Usage usage()
      Returns the value of the usage record component.
      Returns:
      the value of the usage record component
    • thumbnail

      public Instance.Thumbnail thumbnail()
      Returns the value of the thumbnail record component.
      Returns:
      the value of the thumbnail record component
    • languages

      public List<String> languages()
      Returns the value of the languages record component.
      Returns:
      the value of the languages record component
    • configuration

      public Instance.Configuration configuration()
      Returns the value of the configuration record component.
      Returns:
      the value of the configuration record component
    • registrations

      public Instance.Registrations registrations()
      Returns the value of the registrations record component.
      Returns:
      the value of the registrations record component
    • contact

      public Instance.Contact contact()
      Returns the value of the contact record component.
      Returns:
      the value of the contact record component
    • rules

      public List<Rule> rules()
      Returns the value of the rules record component.
      Returns:
      the value of the rules record component