java.lang.Object
java.lang.Record
com.github.sormuras.bach.Project
public record Project(ProjectName name, ProjectVersion version, ProjectSpaces spaces, ProjectExternals externals)
extends Record
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static interface
-
Constructor Summary
ConstructorDescriptionProject
(ProjectName name, ProjectVersion version, ProjectSpaces spaces, ProjectExternals externals) Creates an instance of aProject
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexternals
record component.final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.static Project
of
(String name, ModuleDescriptor.Version version) static Project
spaces()
Returns the value of thespaces
record component.final String
toString()
Returns a string representation of this record class.version()
Returns the value of theversion
record component.with
(Options.ProjectOptions options) with
(Project.Component component) withExternals
(ProjectExternals.Operator operator) withModuleTweak
(String spaceName, String moduleName, DeclaredModule.Operator operator) withSpaces
(ProjectSpaces.Operator operator) withVersion
(ModuleDescriptor.Version version) withVersion
(String version)
-
Constructor Details
-
Project
public Project(ProjectName name, ProjectVersion version, ProjectSpaces spaces, ProjectExternals externals) Creates an instance of aProject
record class.- Parameters:
name
- the value for thename
record componentversion
- the value for theversion
record componentspaces
- the value for thespaces
record componentexternals
- the value for theexternals
record component
-
-
Method Details
-
space
-
toNameAndVersion
-
of
-
of
-
with
-
with
-
with
-
withName
-
withVersion
-
withVersion
-
withSpaces
-
withExternals
-
withModuleTweak
public Project withModuleTweak(String spaceName, String moduleName, DeclaredModule.Operator operator) -
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. -
hashCode
Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
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 withObjects::equals(Object,Object)
. -
name
Returns the value of thename
record component.- Returns:
- the value of the
name
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-
spaces
Returns the value of thespaces
record component.- Returns:
- the value of the
spaces
record component
-
externals
Returns the value of theexternals
record component.- Returns:
- the value of the
externals
record component
-