org.schmant.task.template.io.zip
Class EntityOrReadableFile

java.lang.Object
  extended by org.schmant.task.template.io.zip.EntityOrReadableFile

public class EntityOrReadableFile
extends Object

This object can contain an Entity or a ReadableFile. It is used by Zip tasks.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
EntityOrReadableFile(Object o)
          Constructor.
 
Method Summary
 Entity getEntity()
          Get the entity.
 ReadableFile getReadableFile()
          Get the readable file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityOrReadableFile

public EntityOrReadableFile(Object o)
                     throws IllegalArgumentException
Constructor.

Parameters:
o - Either an Entity or a ReadableFile. Objects that are both (EFile:s) are interpreted as entities.
Throws:
IllegalArgumentException - If the object is neither.
Method Detail

getEntity

public Entity getEntity()
Get the entity.

Returns:
An entity or null if this object contains a readable file.

getReadableFile

public ReadableFile getReadableFile()
Get the readable file.

Returns:
A readable file or null if this object contains an entity.