Package org.linphone.core

# Interface SearchResult

public interface SearchResult
The `SearchResult` object represents a result of a search initiated from
a `MagicSearch`.

## Method Summary

Modifier and Type
Method
Description
`Address`
`getAddress()`
Gets the address of the search result if any.
`int`
`getCapabilities()`
Returns the capabilities mask of the search result.
`Friend`
`getFriend()`
Gets the friend of the search result if any.
`long`
`getNativePointer()`
Gets the native pointer used by this class to make native method calls.
`String`
`getPhoneNumber()`
Gets the phone number of the search result if any.
`int`
`getSourceFlags()`
Gets source flags of the search result.
`Object`
`getUserData()`
Gets the object stored in this object user's data
`int`
`getWeight()`
Gets the weight of the search result.
`boolean`
`hasCapability(Friend.Capability capability)`
Returns whether or not the search result has the given capability.
`boolean`
`hasSourceFlag(MagicSearch.Source source)`
Returns whether or not the search result has the given source flag.
`void`
`setUserData(Object data)`
Sets the object to store in this object user's data
`String`
`toString()`

## Method Details

### getAddress

Address getAddress()
Gets the address of the search result if any.

Returns:
  The associed `Address` or null.

### getCapabilities

int getCapabilities()
Returns the capabilities mask of the search result.

Returns:
  the capabilities mask associated to the search result

### getFriend

Friend getFriend()
Gets the friend of the search result if any.

Returns:
  The associated `Friend` or null.

### getPhoneNumber

String getPhoneNumber()
Gets the phone number of the search result if any.

Returns:
  The associed phone number or null.

### getSourceFlags

int getSourceFlags()
Gets source flags of the search result.

Returns:
  the source flags from
  invalid reference

      MagicSearch#Source

### getWeight

int getWeight()
Gets the weight of the search result.

Returns:
  the result weight

### hasCapability

boolean hasCapability(Friend.Capability capability)
Returns whether or not the search result has the given capability.

Parameters:
  `capability` - the
  invalid reference

      Friend#Capability

  to check
Returns:
  true if it has the capability, false otherwise.

### hasSourceFlag

boolean hasSourceFlag(MagicSearch.Source source)
Returns whether or not the search result has the given source flag.

Parameters:
  `source` - the
  invalid reference

      MagicSearch#Source

  to check
Returns:
  true if it has the source flag, false otherwise.

### setUserData

void setUserData(Object data)
Sets the object to store in this object user's data

Parameters:
  `data` - the object to store

### getUserData

Object getUserData()
Gets the object stored in this object user's data

Returns:
  the object store if any, null otherwise

### getNativePointer

long getNativePointer()
Gets the native pointer used by this class to make native method calls.

Returns:
  the nativer pointer, as long

### toString

String toString()

Overrides:
  `toString` in class `Object`