uk.ac.ed.inf.ogsaconfig.garm.util
Class VFileSet

java.lang.Object
  |
  +--uk.ac.ed.inf.ogsaconfig.garm.util.VFileSet
Direct Known Subclasses:
VFileSourceSet

public class VFileSet
extends java.lang.Object

Implements a set of VFiles, and provides a simple API to access them. This is used at some level by almost every FileCollection


Constructor Summary
VFileSet()
           
 
Method Summary
 void add(VFile vfile)
          Adds a new vfile to the set, replacing any existing equals() file
 VFileSet narrow(FileType type)
          returns a new VFileSet containing only files of the given type
 void print()
          A debug method to show the contents of the vfile on stdout
 void remove(VFile vfile)
          Removes a vfile from the set
 VFile retrieve(VFile vfile)
          returns the vfile in the set which is equals() to the one given, or null if there is no such file
 VFile[] toArray()
          returns the files present in the set as an array, all references are live
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VFileSet

public VFileSet()
Method Detail

add

public void add(VFile vfile)
Adds a new vfile to the set, replacing any existing equals() file


remove

public void remove(VFile vfile)
Removes a vfile from the set


print

public void print()
A debug method to show the contents of the vfile on stdout


retrieve

public VFile retrieve(VFile vfile)
returns the vfile in the set which is equals() to the one given, or null if there is no such file


toArray

public VFile[] toArray()
returns the files present in the set as an array, all references are live


narrow

public VFileSet narrow(FileType type)
returns a new VFileSet containing only files of the given type