Java: equals
boolean equals(Object other)
If the given object is not a Path, or is a Path associated with a different FileSystem
, then this method returns false
.
Whether or not two path are equal depends on the file system implementation. In some cases the paths are compared without regard to case, and others are case sensitive. This method does not access the file system and the file is not required to exist. Where required, the isSameFile
method may be used to check if two paths locate the same file.
This method satisfies the general contract of the Object.equals
method.
Overrides:
equals
in class Object
Parameters:
other
- the object to which this object is to be compared
Returns:
true
if, and only if, the given object is a Path
that is identical to this Path
See Also:
Object.hashCode()
, HashMap