to.etc.domui.util.resources
Class ResourceDependencyList

java.lang.Object
  extended by to.etc.domui.util.resources.ResourceDependencyList
All Implemented Interfaces:
IResourceDependencyList

public final class ResourceDependencyList
extends java.lang.Object
implements IResourceDependencyList

Used to build resource dependencies. Dependencies on resources can be added to this list, and when done a ResourceDependencies object can be gotten from this. This is NOT threadsafe(!), but the resulting ResourceDependencies instance is.

Author:
Frits Jalvingh Created on Oct 19, 2009

Field Summary
static IResourceDependencyList NULL
          If you do not want to collect dependencies you can use this as an instance.
 
Constructor Summary
ResourceDependencyList()
           
 
Method Summary
 void add(IIsModified m)
          Add a IIsModified instance.
 void add(IModifyableResource c)
          Add an IModifyableResource instance.
 void add(IResourceRef ref)
          Add a resource to the dependency list.
 void add(ResourceDependencyList c)
           
 ResourceDependencies createDependencies()
          Get the immutable dependencies instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL

public static final IResourceDependencyList NULL
If you do not want to collect dependencies you can use this as an instance. It ignores everything added to it.

Constructor Detail

ResourceDependencyList

public ResourceDependencyList()
Method Detail

add

public void add(@Nonnull
                IResourceRef ref)
Description copied from interface: IResourceDependencyList
Add a resource to the dependency list. The resource should either implement IIsModified or IModifyableResource, or this will throw an IllegalArgmentException. If the ref implements IModifyableResource then it will be wrapped in a ResourceTimestamp instance which records the current modification time and implements IIsModified.

Specified by:
add in interface IResourceDependencyList
See Also:
IResourceDependencyList.add(to.etc.domui.util.resources.IResourceRef)

add

public void add(@Nonnull
                IIsModified m)
Description copied from interface: IResourceDependencyList
Add a IIsModified instance.

Specified by:
add in interface IResourceDependencyList
See Also:
IResourceDependencyList.add(to.etc.domui.util.resources.IIsModified)

add

public void add(@Nonnull
                IModifyableResource c)
Description copied from interface: IResourceDependencyList
Add an IModifyableResource instance.

Specified by:
add in interface IResourceDependencyList
See Also:
IResourceDependencyList.add(to.etc.domui.util.resources.IModifyableResource)

add

public void add(@Nonnull
                ResourceDependencyList c)
See Also:
to.etc.domui.util.resources.IResourceDependencyList#add(to.etc.domui.util.resources.ResourceDependencyList)

createDependencies

public ResourceDependencies createDependencies()
Get the immutable dependencies instance.

Returns: