## net.dontdrinkandroot.lastfm.api.queries
Class AbstractQuery<T extends java.io.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 java.io.Serializable>

extends java.lang.Object
implements Query<T>

Implementation of the common methods of a `Query`.

Author:
  Philip W. Sorst

Constructor Summary
`AbstractQuery(java.lang.String method)`

Method Summary
`protected void` `addAdditionalParameters()`
`void` `addParameter(java.lang.String key, java.lang.Object value)` Add a parameter to the query parameters.
`java.lang.String` `getMethod()` Get the last.fm method that is fetched by this query.
`java.util.Map<java.lang.String,java.lang.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(java.lang.String method)

Method Detail

### getParameters

    public final java.util.Map<java.lang.String,java.lang.String> getParameters()

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

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

### addAdditionalParameters

    protected void addAdditionalParameters()

### getMethod

    public final java.lang.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 java.io.Serializable>`
  Returns:

### addParameter

    public final void addParameter(java.lang.String key,
                                   java.lang.Object value)

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

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

Copyright © 2012. All Rights Reserved.