Class RuntimeRepositoryBranding

java.lang.Object
com.io7m.coffeepick.runtime.RuntimeRepositoryBranding
All Implemented Interfaces:
RuntimeRepositoryBrandingType

public final class RuntimeRepositoryBranding
extends java.lang.Object
implements RuntimeRepositoryBrandingType
Branding information for a repository.
  • Method Details

    • logo

      public java.net.URI logo()
      A reference to a 128x128 PNG logo.
      Specified by:
      logo in interface RuntimeRepositoryBrandingType
      Returns:
      A logo URI
    • title

      public java.lang.String title()
      Specified by:
      title in interface RuntimeRepositoryBrandingType
      Returns:
      The humanly-readable title of the repository
    • subtitle

      public java.lang.String subtitle()
      Specified by:
      subtitle in interface RuntimeRepositoryBrandingType
      Returns:
      The humanly-readable subtitle of the repository
    • site

      public java.net.URI site()
      Specified by:
      site in interface RuntimeRepositoryBrandingType
      Returns:
      The URI of the repository's web site
    • withLogo

      public final RuntimeRepositoryBranding withLogo​(java.net.URI value)
      Copy the current immutable object by setting a value for the logo attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for logo
      Returns:
      A modified copy of the this object
    • withTitle

      public final RuntimeRepositoryBranding withTitle​(java.lang.String value)
      Copy the current immutable object by setting a value for the title attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for title
      Returns:
      A modified copy of the this object
    • withSubtitle

      public final RuntimeRepositoryBranding withSubtitle​(java.lang.String value)
      Copy the current immutable object by setting a value for the subtitle attribute. An equals check used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for subtitle
      Returns:
      A modified copy of the this object
    • withSite

      public final RuntimeRepositoryBranding withSite​(java.net.URI value)
      Copy the current immutable object by setting a value for the site attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for site
      Returns:
      A modified copy of the this object
    • equals

      public boolean equals​(java.lang.Object another)
      This instance is equal to all instances of RuntimeRepositoryBranding that have equal attribute values.
      Overrides:
      equals in class java.lang.Object
      Returns:
      true if this is equal to another instance
    • hashCode

      public int hashCode()
      Computes a hash code from attributes: logo, title, subtitle, site.
      Overrides:
      hashCode in class java.lang.Object
      Returns:
      hashCode value
    • toString

      public java.lang.String toString()
      Prints the immutable value RuntimeRepositoryBranding with attribute values.
      Overrides:
      toString in class java.lang.Object
      Returns:
      A string representation of the value
    • copyOf

      public static RuntimeRepositoryBranding copyOf​(RuntimeRepositoryBrandingType instance)
      Creates an immutable copy of a RuntimeRepositoryBrandingType value. Uses accessors to get values to initialize the new immutable instance. If an instance is already immutable, it is returned as is.
      Parameters:
      instance - The instance to copy
      Returns:
      A copied immutable RuntimeRepositoryBranding instance
    • builder

      public static RuntimeRepositoryBranding.Builder builder()
      Creates a builder for RuntimeRepositoryBranding.
       RuntimeRepositoryBranding.builder()
          .setLogo(java.net.URI) // required logo
          .setTitle(String) // required title
          .setSubtitle(String) // required subtitle
          .setSite(java.net.URI) // required site
          .build();
       
      Returns:
      A new RuntimeRepositoryBranding builder