bing.responses
Class BingResponse

java.lang.Object
  extended by bing.responses.BingResponse
Direct Known Subclasses:
BingAdResponse, BingBundleResponse, BingImageResponse, BingInstantAnswerResponse, BingMobileWebResponse, BingNewsResponse, BingPhonebookResponse, BingRelatedSearchResponse, BingSpellResponse, BingTranslationResponse, BingVideoResponse, BingWebResponse

public abstract class BingResponse
extends java.lang.Object

Base class for all Response objects. Holds all general response parameters.


Method Summary
 void addResult(BingResult result)
          Add a single result to this reponse.
 java.lang.String getAlterationOverrideQuery()
           
 java.lang.String getAlteredQuery()
           
 long getOffset()
           
 java.lang.String getQuery()
           
 long getTotal()
           
 void handleElements(java.util.Hashtable table)
          Some Bing responses can contain extra data then what is normally processed, process that data here if supported.
 int hashCode()
           
 BingResult[] results()
          Get the results that this Response object holds.
 void setAlterationOverrideQuery(java.lang.String alterationOverrideQuery)
           
 void setAlteredQuery(java.lang.String alteredQuery)
           
 void setOffset(long offset)
           
 void setQuery(java.lang.String query)
           
 void setTotal(long total)
           
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getTotal

public long getTotal()

setTotal

public void setTotal(long total)

getOffset

public long getOffset()

setOffset

public void setOffset(long offset)

getQuery

public java.lang.String getQuery()

setQuery

public void setQuery(java.lang.String query)

getAlteredQuery

public java.lang.String getAlteredQuery()

setAlteredQuery

public void setAlteredQuery(java.lang.String alteredQuery)

getAlterationOverrideQuery

public java.lang.String getAlterationOverrideQuery()

setAlterationOverrideQuery

public void setAlterationOverrideQuery(java.lang.String alterationOverrideQuery)

addResult

public void addResult(BingResult result)
Add a single result to this reponse.

Parameters:
result - The BingResult object to add.

results

public BingResult[] results()
Get the results that this Response object holds.

Returns:
Array of Result objects. Empty if the search returned no results.

handleElements

public void handleElements(java.util.Hashtable table)
Some Bing responses can contain extra data then what is normally processed, process that data here if supported.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object