|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.xnap.search.AbstractSearchResult
public abstract class AbstractSearchResult
This class is the default implementation for search results.
| Field Summary |
|---|
| Fields inherited from interface org.xnap.search.SearchResult |
|---|
BITRATE, FREQUENCY, HIDE_PREFIX, LENGTH, MD5, SHA1, URN |
| Constructor Summary | |
|---|---|
AbstractSearchResult()
|
|
AbstractSearchResult(java.lang.String separatorChars)
Constructs the search result object. |
|
| Method Summary | |
|---|---|
java.lang.Object |
get(java.lang.String key)
Returns a value. |
javax.swing.Icon |
getIcon()
Returns null. |
java.lang.String[] |
getPath()
Returns the path. |
java.lang.String |
getShortFilename()
Splits SearchResult.getFilename() by the last
occurence of separatorChars and returns the remainder. |
int |
getSourcesCount()
Returns 1. |
java.util.Iterator |
keys()
Returns an iterator for all keys that can be retreived by calling SearchResult.get(String). |
void |
put(java.lang.String key,
java.lang.Object value)
Sets the value of key to value. |
| 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 |
|---|
canGroup, createContainer, getActions, getAvailability, getFilename, getFilesize, getHash, getPeer, getPlugin |
| Constructor Detail |
|---|
public AbstractSearchResult(java.lang.String separatorChars)
separatorCharss - the path separator charspublic AbstractSearchResult()
| Method Detail |
|---|
public java.lang.Object get(java.lang.String key)
Hashtable
to retreive the value.
get in interface SearchResultkey - the keypublic javax.swing.Icon getIcon()
getIcon in interface SearchResultpublic java.lang.String[] getPath()
StringTokenizer to split
SearchResult.getFilename() by
separatorCharss.
getPath in interface SearchResultpublic java.lang.String getShortFilename()
SearchResult.getFilename() by the last
occurence of separatorChars and returns the remainder.
getShortFilename in interface SearchResultpublic int getSourcesCount()
getSourcesCount in interface SearchResultpublic java.util.Iterator keys()
SearchResultSearchResult.get(String).
keys in interface SearchResult
public void put(java.lang.String key,
java.lang.Object value)
key to value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||