org.eclipse.ecf.presence.search
Class ResultList

java.lang.Object
  extended by org.eclipse.ecf.presence.search.ResultList
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, IResultList

public class ResultList
extends java.lang.Object
implements IResultList

This Class implements IResultList. Subclasses may be created as appropriate.

Since:
2.0

Field Summary
protected  java.util.Set results
           
 
Constructor Summary
ResultList()
          Create a new synchronized result list from a existing one
ResultList(java.util.Collection existingResults)
          Create a new synchronized result list from a existing one
 
Method Summary
 boolean add(IResult item)
          Add an item for the result list
 void addAll(java.util.Collection existingResults)
          Add the list for the current result list
 java.lang.Object getAdapter(java.lang.Class adapter)
           
 IResult getResult(java.lang.String field, java.lang.String value)
          Get the result that math the specific field and value
 java.util.Collection getResults()
          Get results that match the search.
 boolean remove(IResult item)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

results

protected java.util.Set results
Constructor Detail

ResultList

public ResultList(java.util.Collection existingResults)
Create a new synchronized result list from a existing one

Parameters:
existingResults -

ResultList

public ResultList()
Create a new synchronized result list from a existing one

Method Detail

add

public boolean add(IResult item)
Add an item for the result list

Parameters:
item -
Returns:
boolean

addAll

public void addAll(java.util.Collection existingResults)
Add the list for the current result list

Parameters:
existingResults -

getResults

public java.util.Collection getResults()
Description copied from interface: IResultList
Get results that match the search. Instances of list are of type IResult

Specified by:
getResults in interface IResultList
Returns:
Collection of IResult. Will not return null. May return an empty Collection.

remove

public boolean remove(IResult item)

getResult

public IResult getResult(java.lang.String field,
                         java.lang.String value)
Description copied from interface: IResultList
Get the result that math the specific field and value

Specified by:
getResult in interface IResultList
Parameters:
field - field's name used as argument to try to match the search
value - value for the respective field used as argument to try to match the search
Returns:
IResult will be null case it doesn't exist

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object