uk.ac.starlink.connect
Interface Node

All Known Subinterfaces:
Branch, Leaf
All Known Implementing Classes:
ErrorLeaf, FileBranch, FileNode

public interface Node

Represents a node in a (possibly remote) file system.

Note that the Object.equals(java.lang.Object) method must be implemented in such a way that two Nodes referring to the same point in the file system are considered equal. (Don't forget to implement Object.hashCode() consistently with equals too).

Since:
18 Feb 2005

Method Summary
 java.lang.String getName()
          Returns the name of this node.
 Branch getParent()
          Returns the parent branch of this node.
 

Method Detail

getName

java.lang.String getName()
Returns the name of this node. This should not be an entire pathname, that is, it should not include the name of its parent.

Returns:
name

getParent

Branch getParent()
Returns the parent branch of this node. If this node is at the root of its tree, it will return null.

Returns:
parent