Record Class CALocationPath
java.lang.Object
java.lang.Record
com.io7m.cardant.model.CALocationPath
- Record Components:
path- The path
The full path of a location.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.last()static CALocationPathBuild a location path from the given array.path()Returns the value of thepathrecord component.static CALocationPathsingleton(CALocationName name) A singleton path.static CALocationPathA singleton path.toString()Returns a string representation of this record class.withNewName(CALocationName name) Replace the last path element with the given name.withNewName(String name) Replace the last path element with the given name.
-
Constructor Details
-
CALocationPath
The full path of a location.- Parameters:
path- The path
-
-
Method Details
-
toString
-
last
- Returns:
- The location name (the last path component)
-
withNewName
Replace the last path element with the given name.- Parameters:
name- The name- Returns:
- The new path
-
withNewName
Replace the last path element with the given name.- Parameters:
name- The name- Returns:
- The new path
-
ofArray
Build a location path from the given array.- Parameters:
array- The array- Returns:
- The path
-
singleton
A singleton path.- Parameters:
name- The name- Returns:
- The path
-
singleton
A singleton path.- Parameters:
name- The name- Returns:
- The path
-
hashCode
-
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). -
path
-