|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.search.AbstractSearchResultContainer
public abstract class AbstractSearchResultContainer
Stores a list of SearchResult objects. Acts as a proxy for the
first added result.
| Field Summary | |
|---|---|
protected java.util.LinkedList |
results
A list of SearchResult objects. |
| Fields inherited from interface org.xnap.search.SearchResult |
|---|
BITRATE, FREQUENCY, HIDE_PREFIX, LENGTH, MD5, SHA1, URN |
| Constructor Summary | |
|---|---|
AbstractSearchResultContainer()
|
|
| Method Summary | |
|---|---|
boolean |
add(SearchResult result)
Adds result to the container. |
boolean |
canGroup(SearchResult result)
Returns true, if this object and result can be grouped
together. |
SearchResultContainer |
createContainer()
This should not be invoked. |
java.lang.Object |
get(java.lang.String key)
Returns a value. |
int |
getAvailability()
Returns the sum of the availability of all results. |
int |
getChildCount()
|
java.lang.String |
getFilename()
Returns the full filename. |
long |
getFilesize()
Returns the filesize. |
SearchResult |
getFirst()
|
java.lang.Object |
getHash()
Used for grouping of results. |
javax.swing.Icon |
getIcon()
Returns null; |
java.lang.String[] |
getPath()
Returns the tokenized path without delimeters. |
Peer |
getPeer()
Returns null. |
Plugin |
getPlugin()
Returns the originating plugin. |
java.lang.String |
getShortFilename()
Returns the filename presented to the user. |
int |
getSourcesCount()
Returns the number of children. |
java.util.Iterator |
iterator()
Returns an iterator over all contained SearchResult objects. |
java.util.Iterator |
keys()
Returns an iterator for all keys that can be retreived by calling SearchResult.get(String). |
void |
setPropertiesFrom(SearchResult result)
Sets all properties of this container to result's
properties. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.xnap.search.SearchResult |
|---|
getActions |
| Field Detail |
|---|
protected java.util.LinkedList results
SearchResult objects.
| Constructor Detail |
|---|
public AbstractSearchResultContainer()
| Method Detail |
|---|
public boolean add(SearchResult result)
result to the container.
add in interface SearchResultContainerpublic boolean canGroup(SearchResult result)
SearchResultresult can be grouped
together.
canGroup in interface SearchResultpublic SearchResultContainer createContainer()
createContainer in interface SearchResultpublic int getAvailability()
getAvailability in interface SearchResultpublic java.lang.Object get(java.lang.String key)
SearchResult
get in interface SearchResultkey - anything like BITRATE, LENGTH...public int getChildCount()
public java.lang.String getFilename()
SearchResultSearchFilter for
matching.
getFilename in interface SearchResultxnap.search.SearchFilterpublic long getFilesize()
SearchResult
getFilesize in interface SearchResultpublic SearchResult getFirst()
public java.lang.Object getHash()
SearchResult
getHash in interface SearchResultpublic javax.swing.Icon getIcon()
getIcon in interface SearchResultpublic java.lang.String[] getPath()
SearchResultnew String[] { "C:", "Files", "Share" }
getPath in interface SearchResultpublic Plugin getPlugin()
SearchResult
getPlugin in interface SearchResultpublic java.lang.String getShortFilename()
SearchResult
getShortFilename in interface SearchResultpublic Peer getPeer()
getPeer in interface SearchResultpublic int getSourcesCount()
getSourcesCount in interface SearchResultpublic java.util.Iterator iterator()
SearchResult objects.
public java.util.Iterator keys()
SearchResultSearchResult.get(String).
keys in interface SearchResultpublic void setPropertiesFrom(SearchResult result)
result's
properties.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||