net.dontdrinkandroot.lastfm.api.queries

## Interface Query<T extends Serializable>

Type Parameters:
  `T` - The return type of the query.

All Known Subinterfaces:
  AuthenticatedGetQuery<T>, AuthenticatedQuery<T>, GetQuery<T>, PostQuery<T>, UnauthenticatedGetQuery<T>, UnauthenticatedQuery<T>

All Known Implementing Classes:
  AbstractAuthenticatedGetQuery, AbstractPostQuery, AbstractQuery, AbstractUnauthenticatedGetQuery, NoResponseAuthenticatedGetQuery, NoResponsePostQuery

    public interface Query<T extends Serializable>

Superinterface that has to be implemented by all queries.

Author:
  Philip W. Sorst

### Method Summary

Methods
`void` `addParameter(String key, Object value)` Add a parameter to the query parameters.
`String` `getMethod()` Get the last.fm method that is fetched by this query.
`Map<String,String>` `getParameters()` Get query parameters.
`T` `parse(Element root)` Parse the result and return the Object model.

### Method Detail

#### getParameters

    Map<String,String> getParameters()

Get query parameters.

Returns:
  The query parameters.

#### getMethod

    String getMethod()

Get the last.fm method that is fetched by this query.

Returns:

#### addParameter

    void addParameter(String key,
                    Object value)

Add a parameter to the query parameters.

Parameters:
  `key` - The name of the parameter.
  `value` - The value of this parameter. This expects that the object has a reasonable toString() method, otherwise the String has to be passed manually instead of the object.

#### parse

    T parse(Element root)

Parse the result and return the Object model.

Parameters:
  `root` - Dom4j root element.
Returns:
  The query result.