com.limegroup.gnutella.altlocs
Interface AlternateLocationCollector

All Known Implementing Classes:
AlternateLocationCollection, FileDesc

public interface AlternateLocationCollector

Interface for classes that serve as collection points for alternate sources for files.


Method Summary
 boolean add(AlternateLocation al)
          Adds an AlternateLocation instance to the collection of AlternateLocations.
 int addAll(AlternateLocationCollection alc)
          Adds the specified collection of AlternateLocations to this collection.
 int getAltLocsSize()
          Number of alternate locations this collector is holding
 URN getSHA1Urn()
          Accessor for the SHA1 URN instance for this collection.
 boolean hasAlternateLocations()
          Returns whether or not this AlternateLocationCollector has any alternate locations.
 boolean remove(AlternateLocation al)
          Removes the specified location from this collection.
 

Method Detail

add

public boolean add(AlternateLocation al)
Adds an AlternateLocation instance to the collection of AlternateLocations.


addAll

public int addAll(AlternateLocationCollection alc)
Adds the specified collection of AlternateLocations to this collection.

Parameters:
alc - the AlternateLocationCollection instance to add this alternate location to the collection

remove

public boolean remove(AlternateLocation al)
Removes the specified location from this collection.


hasAlternateLocations

public boolean hasAlternateLocations()
Returns whether or not this AlternateLocationCollector has any alternate locations.

Returns:
true if this AlternateLocationCollector has 1 or more alternate locations, false otherwise

getAltLocsSize

public int getAltLocsSize()
Number of alternate locations this collector is holding


getSHA1Urn

public URN getSHA1Urn()
Accessor for the SHA1 URN instance for this collection.

Returns:
the SHA1 URN for this collection