com.threerings.resource
Class ResourceManager.ObservedResource
java.lang.Object
com.threerings.resource.ResourceManager.ObservedResource
- Enclosing class:
- ResourceManager
protected static class ResourceManager.ObservedResource
- extends Object
Contains the state of an observed file resource.
|
Method Summary |
boolean |
checkForModification(String path)
Checks for a modification to the observed resource, notifying the observers if
one is detected. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
observers
public WeakObserverList<ResourceManager.ModificationObserver> observers
- The observers listening for modifications to this resource.
_file
protected File _file
_lastModified
protected long _lastModified
ResourceManager.ObservedResource
public ResourceManager.ObservedResource(File file)
checkForModification
public boolean checkForModification(String path)
- Checks for a modification to the observed resource, notifying the observers if
one is detected.
- Parameters:
path - the path of the resource (to forward to observers).
- Returns:
true if the list of observers is empty and the resource should be
removed from the observed list, false if it should remain in the list.