Package dk.gtz.graphedit.model
Record Class ModelProject
java.lang.Object
java.lang.Record
dk.gtz.graphedit.model.ModelProject
- Record Components:
metadata- A map of generic string-encoded metadata, useful for syntax=specific dataname- The name of the projectexcludeFiles- A list of files to exclude from the project, can be glob-specificationsrunTargets- A list ofModelRunTargetassociated with this project
public record ModelProject(Map<String,String> metadata, String name, List<String> excludeFiles, List<ModelRunTarget> runTargets)
extends Record
On-disk file structure for a project file
Not to be confused with
ModelProjectResource, this class represents a graphedit project.-
Constructor Summary
ConstructorsConstructorDescriptionModelProject(String name) Constructs a new project model with a specified nameModelProject(Map<String, String> metadata, String name, List<String> excludeFiles, List<ModelRunTarget> runTargets) Creates an instance of aModelProjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theexcludeFilesrecord component.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.name()Returns the value of thenamerecord component.Returns the value of therunTargetsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelProject
Constructs a new project model with a specified name- Parameters:
name- The name of the project
-
ModelProject
public ModelProject(Map<String, String> metadata, String name, List<String> excludeFiles, List<ModelRunTarget> runTargets) Creates an instance of aModelProjectrecord class.- Parameters:
metadata- the value for themetadatarecord componentname- the value for thenamerecord componentexcludeFiles- the value for theexcludeFilesrecord componentrunTargets- the value for therunTargetsrecord component
-
-
Method Details
-
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
public final int 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). -
metadata
Returns the value of themetadatarecord component.- Returns:
- the value of the
metadatarecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
excludeFiles
Returns the value of theexcludeFilesrecord component.- Returns:
- the value of the
excludeFilesrecord component
-
runTargets
Returns the value of therunTargetsrecord component.- Returns:
- the value of the
runTargetsrecord component
-