net.dontdrinkandroot.lastfm.api.queries

## Class AbstractQuery<T extends Serializable>

- java.lang.Object
- - net.dontdrinkandroot.lastfm.api.queries.AbstractQuery<T>

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

All Implemented Interfaces:
  Query<T>

Direct Known Subclasses:
  AbstractAuthenticatedGetQuery, AbstractPostQuery, AbstractUnauthenticatedGetQuery, NoResponseAuthenticatedGetQuery

    public abstract class AbstractQuery<T extends Serializable>
    extends Object
    implements Query<T>

Implementation of the common methods of a `Query`.

Author:
  Philip W. Sorst

### Constructor Summary

Constructors
Constructor and Description
`AbstractQuery(String method)`

### Method Summary

Methods
`protected void` `addAdditionalParameters()`
`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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Methods inherited from interface net.dontdrinkandroot.lastfm.api.queries.Query

`parse`

### Constructor Detail

#### AbstractQuery

    public AbstractQuery(String method)

### Method Detail

#### getParameters

    public final Map<String,String> getParameters()

Description copied from interface: `Query`
Get query parameters.

Specified by:
  `getParameters` in interface `Query<T extends Serializable>`
Returns:
  The query parameters.

#### addAdditionalParameters

    protected void addAdditionalParameters()

#### getMethod

    public final String getMethod()

Description copied from interface: `Query`
Get the last.fm method that is fetched by this query.

Specified by:
  `getMethod` in interface `Query<T extends Serializable>`
Returns:

#### addParameter

    public final void addParameter(String key,
                    Object value)

Description copied from interface: `Query`
Add a parameter to the query parameters.

Specified by:
  `addParameter` in interface `Query<T extends Serializable>`
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.