Package ca.phon.util.resources
Class FileHandler<T>
java.lang.Object
ca.phon.util.resources.FileHandler<T>
- All Implemented Interfaces:
ResourceHandler<T>
,Iterable<T>
- Direct Known Subclasses:
FolderHandler
A library handler which allow for loading a list of explicit
files.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a file to the handlergetFiles()
Live list of theFile
s loaded by this handler.iterator()
Return an iterator for instances of type T.abstract T
loadFromFile
(File f) Abstract method for loading the given file as an instance of the parameterized type.void
removeFile
(File f) Remove a file from the handlerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
FileHandler
public FileHandler()
-
-
Method Details
-
iterator
Description copied from interface:ResourceHandler
Return an iterator for instances of type T. -
addFile
Add a file to the handler- Parameters:
file
-
-
removeFile
Remove a file from the handler- Parameters:
file
-
-
getFiles
Live list of theFile
s loaded by this handler.- Returns:
- this list of
File
s
-
loadFromFile
Abstract method for loading the given file as an instance of the parameterized type.- Parameters:
file
-- Throws:
IOException
-