org.schmant.arg
Class EntityAndAbsoluteLocation

java.lang.Object
  extended by org.schmant.support.AbstractArgumentChecker
      extended by org.schmant.arg.EntityAndAbsoluteLocation

public class EntityAndAbsoluteLocation
extends AbstractArgumentChecker

This object combines an uninterpreted EntityView and an AbsoluteLocation. It is use for instance when adding files and directories to a Zip archive to add the entity together with information about where it should be put in the archive.

Since:
0.5
Author:
Karl Gustafsson

Constructor Summary
EntityAndAbsoluteLocation(Object d, Object l)
          Create an entity and absolute location combination.
 
Method Summary
static List<EntityAndAbsoluteLocation> decorateCollection(Collection<?> c, Object l)
          Create a list of EntityAndAbsoluteLocation for the entities in the supplied collection.
 Object getEntity()
          Get the entity.
 Object getLocation()
          Get the location.
 String toString()
           
 
Methods inherited from class org.schmant.support.AbstractArgumentChecker
check, check, check, check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EntityAndAbsoluteLocation

public EntityAndAbsoluteLocation(Object d,
                                 Object l)
Create an entity and absolute location combination.

Parameters:
d - An uninterpreted entity.
l - An uninterpreted absolute location.
Method Detail

getEntity

public Object getEntity()
Get the entity.

Returns:
The entity.

getLocation

public Object getLocation()
Get the location.

Returns:
The location.

decorateCollection

public static List<EntityAndAbsoluteLocation> decorateCollection(Collection<?> c,
                                                                 Object l)
Create a list of EntityAndAbsoluteLocation for the entities in the supplied collection.

Parameters:
c - A collection of objects that can be interpreted as entities.
l - An object that can be interpreted as an absolute location.
Returns:
A list of EntityAndAbsoluteLocation objects. The list is sorted in the order that objects are returned when iterating over the supplied collection.

toString

public String toString()
Overrides:
toString in class Object