Package com.io7m.minisite.core
Class MinSourcesConfiguration
java.lang.Object
com.io7m.minisite.core.MinSourcesConfiguration
- All Implemented Interfaces:
MinSourcesConfigurationType
Configurations for source code repositories.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilds instances of typeMinSourcesConfiguration. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder forMinSourcesConfiguration.static MinSourcesConfigurationcopyOf(MinSourcesConfigurationType instance) Creates an immutable copy of aMinSourcesConfigurationTypevalue.booleanThis instance is equal to all instances ofMinSourcesConfigurationthat have equal attribute values.inthashCode()Computes a hash code from attributes:system,uri.static MinSourcesConfigurationConstruct a new immutableMinSourcesConfigurationinstance.system()toString()Prints the immutable valueMinSourcesConfigurationwith attribute values.uri()final MinSourcesConfigurationwithSystem(String value) Copy the current immutable object by setting a value for thesystemattribute.final MinSourcesConfigurationCopy the current immutable object by setting a value for theuriattribute.
-
Method Details
-
system
- Specified by:
systemin interfaceMinSourcesConfigurationType- Returns:
- The SCM system (such as "Git")
-
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
This instance is equal to all instances ofMinSourcesConfigurationthat have equal attribute values. -
hashCode
public int hashCode()Computes a hash code from attributes:system,uri. -
toString
Prints the immutable valueMinSourcesConfigurationwith attribute values. -
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
-