net.aerith.misao.io
Class MemoryFolder

java.lang.Object
  |
  +--net.aerith.misao.io.MemoryFolder

public class MemoryFolder
extends java.lang.Object
implements Folder

The MemoryFolder represents a folder on the virtual file system on memory.


Field Summary
protected  java.util.Vector folder_list
          The folder hierarchy.
protected  java.util.Hashtable hash_folder
          The Hashtable object.
 
Constructor Summary
MemoryFolder(java.util.Hashtable hash_folder, java.util.Vector folder_list)
          Constructs a MemoryFolder.
 
Method Summary
 boolean exists()
          Returns true if this folder really exists.
 Folder getFolder(java.lang.String name)
          Gets the sub folder.
 java.util.Hashtable getHash()
          Gets the Hashtable object.
 java.util.Vector getHierarchy()
          Gets the folder hierarchy.
 java.lang.String getID()
          Gets the ID of this folder.
 java.lang.String getName()
          Gets the name of this folder.
 boolean isFolder()
          Returns true if this folder is a real folder.
 Folder[] list()
          Gets the list of sub folders.
protected  java.lang.String paramString()
          Returns a raw string representation of the state of this object, for debugging use.
 java.lang.String toString()
          Returns a string representation of the state of this object, for debugging use.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

hash_folder

protected java.util.Hashtable hash_folder
The Hashtable object.

folder_list

protected java.util.Vector folder_list
The folder hierarchy.
Constructor Detail

MemoryFolder

public MemoryFolder(java.util.Hashtable hash_folder,
                    java.util.Vector folder_list)
Constructs a MemoryFolder.
Parameters:
hash_folder - the Hashtable object of the folder.
folder_list - the leading folder hierarchy.
Method Detail

getHash

public java.util.Hashtable getHash()
Gets the Hashtable object.
Returns:
the Hashtable object.

getHierarchy

public java.util.Vector getHierarchy()
Gets the folder hierarchy.
Specified by:
getHierarchy in interface Folder
Returns:
the folder hierarchy.

getID

public java.lang.String getID()
Gets the ID of this folder.
Specified by:
getID in interface Folder
Returns:
the ID of this folder.

getName

public java.lang.String getName()
Gets the name of this folder.
Specified by:
getName in interface Folder
Returns:
the name of this folder.

getFolder

public Folder getFolder(java.lang.String name)
Gets the sub folder.
Specified by:
getFolder in interface Folder
Parameters:
name - the name of the sub folder.
Returns:
the sub folder.

isFolder

public boolean isFolder()
Returns true if this folder is a real folder.
Specified by:
isFolder in interface Folder
Returns:
true if this folder is a real folder.

exists

public boolean exists()
Returns true if this folder really exists.
Specified by:
exists in interface Folder
Returns:
true if this folder really exists.

list

public Folder[] list()
Gets the list of sub folders.
Specified by:
list in interface Folder
Returns:
the list of sub folders.

paramString

protected java.lang.String paramString()
Returns a raw string representation of the state of this object, for debugging use. It should be invoked from toString method of the subclasses.
Returns:
a string representation of the state of this object.

toString

public java.lang.String toString()
Returns a string representation of the state of this object, for debugging use.
Specified by:
toString in interface Folder
Overrides:
toString in class java.lang.Object
Returns:
a string representation of the state of this object.