org.at4j.archive.builder
Class EntryToArchive

java.lang.Object
  extended by org.at4j.archive.builder.EntryToArchive

public class EntryToArchive
extends Object

This object contains data about an entry that is about to be added to an archive. It is used by the different filters that can be used with an ArchiveBuilder.

Instances of this class is immutable.

Since:
1.0
Author:
Karl Gustafsson

Constructor Summary
EntryToArchive(AbsoluteLocation loc, EntityType entType, Object entryToArchive)
          Create a new configuration object for an entry that are to be added to an archive.
 
Method Summary
 boolean equals(Object o)
           
 EntityType getEntityType()
          Get the entry type.
 Object getEntryToArchive()
          Get the entry to archive.
 AbsoluteLocation getLocation()
          Get the location of the entry in the archive.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryToArchive

public EntryToArchive(AbsoluteLocation loc,
                      EntityType entType,
                      Object entryToArchive)
Create a new configuration object for an entry that are to be added to an archive.

Parameters:
loc - The entry's location in the archive.
entType - The entry's type.
entryToArchive - The entry to archive. This may be a ReadableFile, a DirectoryView, a File or an InputStream. In the latter case, this method may not read any data from the stream. If the entity is ReadLockable (which ReadableFile and DirectoryView is), it is locked for reading while this object is used.
Method Detail

getLocation

public AbsoluteLocation getLocation()
Get the location of the entry in the archive.

Returns:
The location of the entry in the archive.

getEntityType

public EntityType getEntityType()
Get the entry type.

Returns:
The entry type.

getEntryToArchive

public Object getEntryToArchive()
Get the entry to archive. This may be a ReadableFile , a DirectoryView, a File or an InputStream. In the latter case, this method may not read any data from the stream. If the entity is ReadLockable (which ReadableFile and DirectoryView is), it is locked for reading when this method is called.

Returns:
The entry to archive.

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object