|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.limegroup.gnutella.altlocs.AlternateLocationCollection<T>
public class AlternateLocationCollection<T extends AlternateLocation>
This class holds a collection of AlternateLocation instances, providing type safety for alternate location data.
AlternateLocation| Field Summary | |
|---|---|
static AlternateLocationCollection |
EMPTY
|
| Method Summary | ||
|---|---|---|
boolean |
add(T al)
Adds a new AlternateLocation to the list. |
|
void |
clear()
|
|
boolean |
contains(Object loc)
|
|
static
|
create(URN sha1)
Factory constructor for creating a new AlternateLocationCollection for this URN. |
|
boolean |
equals(Object o)
|
|
int |
getAltLocsSize()
|
|
static
|
getEmptyCollection()
Returns a type-safe empty collection. |
|
URN |
getSHA1Urn()
Returns the SHA1 for this AlternateLocationCollection. |
|
boolean |
hasAlternateLocations()
|
|
String |
httpStringValue()
Implements the HTTPHeaderValue interface. |
|
Iterator<T> |
iterator()
|
|
boolean |
remove(T al)
Removes this AlternateLocation from the active locations and adds it to the removed locations. |
|
String |
toString()
Overrides Object.toString to print out all of the alternate locations for this collection of alternate locations. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final AlternateLocationCollection EMPTY
| Method Detail |
|---|
public static <T extends AlternateLocation> AlternateLocationCollection<T> getEmptyCollection()
T -
public static <T extends AlternateLocation> AlternateLocationCollection<T> create(URN sha1)
sha1 - the SHA1 URN for this collection
public URN getSHA1Urn()
public boolean add(T al)
al - the AlternateLocation to add
IllegalArgumentException - if the
AlternateLocation being added does not have a SHA1 urn or if
the SHA1 urn does not match the urn for this collectionpublic boolean remove(T al)
public void clear()
public boolean hasAlternateLocations()
public boolean contains(Object loc)
public String httpStringValue()
httpStringValue in interface HTTPHeaderValuepublic int getAltLocsSize()
public Iterator<T> iterator()
iterator in interface Iterable<T extends AlternateLocation>public String toString()
toString in class Objectpublic boolean equals(Object o)
equals in class Object
|
LimeWire Consolidated API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||