Class Index | File Index

Classes


Class SweetDevRia.SuggestBuffer


Defined in: Suggest.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SweetDevRia.SuggestBuffer(suggest, size)
This is the SuggestBuffer component class This class manages the buffer of the Suggest component Each data has for key a pair of value/pageNumber, and as value a SuggestData item Implemented as a FILO
Method Summary
Method Attributes Method Name and Description
<private>  
add(suggestData, value, page)
Add a SuggestData for a couple value/page
 
Clean the buffer, reseting its size to 0
 
contains(value, page)
Return true if the buffer contains the key value/page
 
get(value, page)
Return the SuggestData associated to this couple value/page.
 
getElementAt(index)
Return the SuggestData at a specified index.
 
Return the current filling size of the buffer
<private>  
repush(value, page)
Repush a data at the end of the FILO
Class Detail
SweetDevRia.SuggestBuffer(suggest, size)
This is the SuggestBuffer component class This class manages the buffer of the Suggest component Each data has for key a pair of value/pageNumber, and as value a SuggestData item Implemented as a FILO
Parameters:
{Suggest} suggest
the suggest object the buffer is related to
{int} size
the size of the buffer, -1 for an unlimited buffer size
Method Detail
<private> add(suggestData, value, page)
Add a SuggestData for a couple value/page
Parameters:
{SuggestData} suggestData
the suggestData to add
{String} value
the value of this suggestData
{page} page
the page number of this suggestData

clean()
Clean the buffer, reseting its size to 0

{boolean} contains(value, page)
Return true if the buffer contains the key value/page
Parameters:
{String} value
the value to search
{int} page
the page to search for the value
Returns:
true if this couple value/page is contained in the buffer

{SuggestData} get(value, page)
Return the SuggestData associated to this couple value/page. null if not found
Parameters:
{String} value
the value related to the data to get
{int} page
the page related to the data to get
Returns:
the SuggestData associated to this couple value/page. null if not found

{SuggestData} getElementAt(index)
Return the SuggestData at a specified index. Used to iterate over the buffer's data.
Parameters:
{int} index
the index to get
Returns:
the SuggestData for this index.

{int} length()
Return the current filling size of the buffer
Returns:
the current filling size of the buffer

<private> repush(value, page)
Repush a data at the end of the FILO
Parameters:
{String} value
the value of the data to repush
{page} page
the page number to repush

Documentation generated by JsDoc Toolkit 2.0.0 on Thu May 05 2011 12:20:33 GMT+0200 (CEST)