gpt4 book ai didi

java - Path.equals 方法说明

转载 作者:行者123 更新时间:2023-12-01 04:23:25 33 4
gpt4 key购买 nike

直接来自此API :

     equals     boolean equals(Object other)     Tests this path for equality with the given object.     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

首先他们说:

1)

If the given object is not a Path, or is a Path associated with a different FileSystem, then this method returns false.

然后他们说:

2)

This method does not access the file system and the file is not required to exist.

如果点号2为真,jvm如何检查点1

提前致谢。

最佳答案

Path代表系统相关文件路径,但不是实际文件。它不需要访问文件系统。

关于java - Path.equals 方法说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18737740/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com