|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 SearchResultContainer
public boolean canGroup(SearchResult result)
SearchResult
result
can be grouped
together.
canGroup
in interface SearchResult
public SearchResultContainer createContainer()
createContainer
in interface SearchResult
public int getAvailability()
getAvailability
in interface SearchResult
public java.lang.Object get(java.lang.String key)
SearchResult
get
in interface SearchResult
key
- anything like BITRATE, LENGTH...public int getChildCount()
public java.lang.String getFilename()
SearchResult
SearchFilter
for
matching.
getFilename
in interface SearchResult
xnap.search.SearchFilter
public long getFilesize()
SearchResult
getFilesize
in interface SearchResult
public SearchResult getFirst()
public java.lang.Object getHash()
SearchResult
getHash
in interface SearchResult
public javax.swing.Icon getIcon()
getIcon
in interface SearchResult
public java.lang.String[] getPath()
SearchResult
new String[] { "C:", "Files", "Share" }
getPath
in interface SearchResult
public Plugin getPlugin()
SearchResult
getPlugin
in interface SearchResult
public java.lang.String getShortFilename()
SearchResult
getShortFilename
in interface SearchResult
public Peer getPeer()
getPeer
in interface SearchResult
public int getSourcesCount()
getSourcesCount
in interface SearchResult
public java.util.Iterator iterator()
SearchResult
objects.
public java.util.Iterator keys()
SearchResult
SearchResult.get(String)
.
keys
in interface SearchResult
public void setPropertiesFrom(SearchResult result)
result's
properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |