@Override public HashMap<String,String> createMap(){
  HashMap<String,String> queryMap=new HashMap<>();
  if (query != null) {
    queryMap.put("q",query);
  }
  if (tags != null) {
    queryMap.put("tags",tags);
  }
  if (filter != null) {
    queryMap.put("filter",filter.toString());
  }
  if (license != null) {
    queryMap.put("license",license.toString());
  }
  if (bpmFrom != -1) {
    queryMap.put("bpm[from]",String.valueOf(bpmFrom));
  }
  if (bpmTo != -1) {
    queryMap.put("bpm[to]",String.valueOf(bpmTo));
  }
  if (durationFrom != -1) {
    queryMap.put("duration[from]",String.valueOf(durationFrom));
  }
  if (durationTo != -1) {
    queryMap.put("duration[to]",String.valueOf(durationTo));
  }
  if (createdAtFrom != null) {
    queryMap.put("created_at[from]",createdAtFrom);
  }
  if (createdAtTo != null) {
    queryMap.put("created_at[to]",createdAtTo);
  }
  if (ids != null) {
    queryMap.put("ids",ids);
  }
  if (createdAtTo != null) {
    queryMap.put("genres",genres);
  }
  if (createdAtTo != null) {
    queryMap.put("types",types);
  }
  if (queryMap.size() > 0) {
    queryMap.put(Pager.LIMIT,String.valueOf(limit));
    return queryMap;
  }
 else {
    return null;
  }
}

@ Override public HashMap < String , String > createMap ( ) { HashMap < String , String > queryMap = new HashMap < > ( ) ; if ( query != null ) { queryMap . put ( "q" , query ) ; } if ( tags != null ) { queryMap . put ( "tags" , tags ) ; } if ( filter != null ) { queryMap . put ( "filter" , filter . toString ( ) ) ; } if ( license != null ) { queryMap . put ( "license" , license . toString ( ) ) ; } if ( bpmFrom != - 1 ) { queryMap . put ( "bpm[from]" , String . valueOf ( bpmFrom ) ) ; } if ( bpmTo != - 1 ) { queryMap . put ( "bpm[to]" , String . valueOf ( bpmTo ) ) ; } if ( durationFrom != - 1 ) { queryMap . put ( "duration[from]" , String . valueOf ( durationFrom ) ) ; } if ( durationTo != - 1 ) { queryMap . put ( "duration[to]" , String . valueOf ( durationTo ) ) ; } if ( createdAtFrom != null ) { queryMap . put ( "created_at[from]" , createdAtFrom ) ; } if ( createdAtTo != null ) { queryMap . put ( "created_at[to]" , createdAtTo ) ; } if ( ids != null ) { queryMap . put ( "ids" , ids ) ; } if ( createdAtTo != null ) { queryMap . put ( "genres" , genres ) ; } if ( createdAtTo != null ) { queryMap . put ( "types" , types ) ; } if ( queryMap . size ( ) > 0 ) { queryMap . put ( Pager . LIMIT , String . valueOf ( limit ) ) ; return queryMap ; } else { return null ; } }
creates a hashmap that can be used to query the soundcloud api for tracks .
