Package de.julianweinelt.datacat.api
Record Class FileObject
java.lang.Object
java.lang.Record
de.julianweinelt.datacat.api.FileObject
-
Constructor Summary
ConstructorsConstructorDescriptionFileObject(String path, String name, boolean directory, List<FileObject> children, FileType type) Creates an instance of aFileObjectrecord class. -
Method Summary
Modifier and TypeMethodDescriptionchildren()Returns the value of thechildrenrecord component.booleanReturns the value of thedirectoryrecord component.booleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.json()name()Returns the value of thenamerecord component.path()Returns the value of thepathrecord component.@NotNull StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
FileObject
public FileObject(String path, String name, boolean directory, List<FileObject> children, FileType type) Creates an instance of aFileObjectrecord class.- Parameters:
path- the value for thepathrecord componentname- the value for thenamerecord componentdirectory- the value for thedirectoryrecord componentchildren- the value for thechildrenrecord componenttype- the value for thetyperecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
json
-
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 int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
path
Returns the value of thepathrecord component.- Returns:
- the value of the
pathrecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
directory
public boolean directory()Returns the value of thedirectoryrecord component.- Returns:
- the value of the
directoryrecord component
-
children
Returns the value of thechildrenrecord component.- Returns:
- the value of the
childrenrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-