Package com.io7m.coffeepick.runtime
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.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRuntimeRepositoryBranding.BuilderBuilds instances of typeRuntimeRepositoryBranding. -
Method Summary
Modifier and Type Method Description static RuntimeRepositoryBranding.Builderbuilder()Creates a builder forRuntimeRepositoryBranding.static RuntimeRepositoryBrandingcopyOf(RuntimeRepositoryBrandingType instance)Creates an immutable copy of aRuntimeRepositoryBrandingTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryBrandingthat have equal attribute values.inthashCode()Computes a hash code from attributes:logo,title,subtitle,site.java.net.URIlogo()A reference to a 128x128 PNG logo.java.net.URIsite()java.lang.Stringsubtitle()java.lang.Stringtitle()java.lang.StringtoString()Prints the immutable valueRuntimeRepositoryBrandingwith attribute values.RuntimeRepositoryBrandingwithLogo(java.net.URI value)Copy the current immutable object by setting a value for thelogoattribute.RuntimeRepositoryBrandingwithSite(java.net.URI value)Copy the current immutable object by setting a value for thesiteattribute.RuntimeRepositoryBrandingwithSubtitle(java.lang.String value)Copy the current immutable object by setting a value for thesubtitleattribute.RuntimeRepositoryBrandingwithTitle(java.lang.String value)Copy the current immutable object by setting a value for thetitleattribute.
-
Method Details
-
logo
public java.net.URI logo()A reference to a 128x128 PNG logo.- Specified by:
logoin interfaceRuntimeRepositoryBrandingType- Returns:
- A logo URI
-
title
public java.lang.String title()- Specified by:
titlein interfaceRuntimeRepositoryBrandingType- Returns:
- The humanly-readable title of the repository
-
subtitle
public java.lang.String subtitle()- Specified by:
subtitlein interfaceRuntimeRepositoryBrandingType- Returns:
- The humanly-readable subtitle of the repository
-
site
public java.net.URI site()- Specified by:
sitein interfaceRuntimeRepositoryBrandingType- Returns:
- The URI of the repository's web site
-
withLogo
Copy the current immutable object by setting a value for thelogoattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for logo- Returns:
- A modified copy of the
thisobject
-
withTitle
Copy the current immutable object by setting a value for thetitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for title- Returns:
- A modified copy of the
thisobject
-
withSubtitle
Copy the current immutable object by setting a value for thesubtitleattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for subtitle- Returns:
- A modified copy of the
thisobject
-
withSite
Copy the current immutable object by setting a value for thesiteattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for site- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofRuntimeRepositoryBrandingthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:logo,title,subtitle,site.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueRuntimeRepositoryBrandingwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
copyOf
Creates an immutable copy of aRuntimeRepositoryBrandingTypevalue. 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
Creates a builder forRuntimeRepositoryBranding.RuntimeRepositoryBranding.builder() .setLogo(java.net.URI) // requiredlogo.setTitle(String) // requiredtitle.setSubtitle(String) // requiredsubtitle.setSite(java.net.URI) // requiredsite.build();- Returns:
- A new RuntimeRepositoryBranding builder
-