?? node.java
字號:
/**
* Copyright 2007 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.paoding.analysis.dictionary.support.detection;
/**
*
* @author Zhiliang Wang [qieqie.wang@gmail.com]
*
* @since 2.0.2
*
*/
public class Node {
String path;
boolean isFile;
public Node() {
}
public Node(String path, boolean isFile) {
this.path = path;
this.isFile = isFile;
}
/**
* 返回結點路徑
* <p>
* 如果該結點為根,則返回根的絕對路徑<br>
* 如果該結點為根下的目錄或文件,則返回其相對與根的路徑<br>
*
* @return
*/
public String getPath() {
return path;
}
/**
* 該結點當時的屬性:是否為文件
*
* @return
*/
public boolean isFile() {
return isFile;
}
public String toString() {
return path;
}
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((path == null) ? 0 : path.hashCode());
return result;
}
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
final Node other = (Node) obj;
if (path == null) {
if (other.path != null)
return false;
} else if (!path.equals(other.path))
return false;
return true;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -