If you think the Android project pequeno-android-spotify listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/**
* Copyright 2015 ze-pequeno//fromwww.java2s.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/package com.pequeno.android.spotify.api.http.params;
import com.pequeno.android.spotify.api.business.enums.SearchType;
import com.pequeno.android.spotify.api.utils.EnumUtils;
publicclass SearchParameters extends Parameters
{
/**
* Search query
*/private String q;
/**
* Search limit
*/privateInteger limit;
/**
* Search offset
*/privateInteger offest;
/**
* Search market
*/private String market;
/**
* Search types
*/private SearchType[] types;
/**
* Constructor
* @param q Search query
* @param types Search types
*/public SearchParameters(String q, SearchType... types)
{
this.q = q;
this.types = types;
}
/**
* Get search limit
* @return Search limit
*/publicInteger getLimit()
{
return limit;
}
/**
* Set search limit
* @param limit Search limit
*/publicvoid setLimit(Integer limit)
{
this.limit = limit;
}
/**
* Get search offset
* @return Search offset
*/publicInteger getOffest()
{
return offest;
}
/**
* Set search offset
* @param offest Search offset
*/publicvoid setOffest(Integer offest)
{
this.offest = offest;
}
/**
* Get search market
* @return Search market
*/public String getMarket()
{
return market;
}
/**
* Set search market
* @param market Search market
*/publicvoid setMarket(String market)
{
this.market = market;
}
@Override
protectedvoid configureMap()
{
add(Parameter.Query, q);
add(Parameter.Type, EnumUtils.join(types));
add(Parameter.Limit, limit);
add(Parameter.Offest, offest);
add(Parameter.Market, market);
}
}