Package com.io7m.minisite.core
Class MinSourcesConfiguration
java.lang.Object
com.io7m.minisite.core.MinSourcesConfiguration
- All Implemented Interfaces:
MinSourcesConfigurationType
public final class MinSourcesConfiguration extends java.lang.Object implements MinSourcesConfigurationType
Configurations for source code repositories.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMinSourcesConfiguration.BuilderBuilds instances of typeMinSourcesConfiguration. -
Method Summary
Modifier and Type Method Description static MinSourcesConfiguration.Builderbuilder()Creates a builder forMinSourcesConfiguration.static MinSourcesConfigurationcopyOf(MinSourcesConfigurationType instance)Creates an immutable copy of aMinSourcesConfigurationTypevalue.booleanequals(java.lang.Object another)This instance is equal to all instances ofMinSourcesConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:system,uri.static MinSourcesConfigurationof(java.lang.String system, java.net.URI uri)Construct a new immutableMinSourcesConfigurationinstance.java.lang.Stringsystem()java.lang.StringtoString()Prints the immutable valueMinSourcesConfigurationwith attribute values.java.net.URIuri()MinSourcesConfigurationwithSystem(java.lang.String value)Copy the current immutable object by setting a value for thesystemattribute.MinSourcesConfigurationwithUri(java.net.URI value)Copy the current immutable object by setting a value for theuriattribute.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Method Details
-
system
public java.lang.String system()- Specified by:
systemin interfaceMinSourcesConfigurationType- Returns:
- The SCM system (such as "Git")
-
uri
public java.net.URI uri()- Specified by:
uriin interfaceMinSourcesConfigurationType- Returns:
- The repository URL
-
withSystem
Copy the current immutable object by setting a value for thesystemattribute. An equals check used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for system- Returns:
- A modified copy of the
thisobject
-
withUri
Copy the current immutable object by setting a value for theuriattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for uri- Returns:
- A modified copy of the
thisobject
-
equals
public boolean equals(java.lang.Object another)This instance is equal to all instances ofMinSourcesConfigurationthat have equal attribute values.- Overrides:
equalsin classjava.lang.Object- Returns:
trueifthisis equal toanotherinstance
-
hashCode
public int hashCode()Computes a hash code from attributes:system,uri.- Overrides:
hashCodein classjava.lang.Object- Returns:
- hashCode value
-
toString
public java.lang.String toString()Prints the immutable valueMinSourcesConfigurationwith attribute values.- Overrides:
toStringin classjava.lang.Object- Returns:
- A string representation of the value
-
of
Construct a new immutableMinSourcesConfigurationinstance.- Parameters:
system- The value for thesystemattributeuri- The value for theuriattribute- Returns:
- An immutable MinSourcesConfiguration instance
-
copyOf
Creates an immutable copy of aMinSourcesConfigurationTypevalue. 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 MinSourcesConfiguration instance
-
builder
Creates a builder forMinSourcesConfiguration.MinSourcesConfiguration.builder() .setSystem(String) // requiredsystem.setUri(java.net.URI) // requireduri.build();- Returns:
- A new MinSourcesConfiguration builder
-