Android Open Source - Android-iTunes-Client-Library Basic Parameter






From Project

Back to project page Android-iTunes-Client-Library.

License

The source code is released under:

Apache License

If you think the Android project Android-iTunes-Client-Library 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

package com.tassioauad.androiditunesclientlibrary.service.parameter;
/*  w  ww. j  av  a 2  s .  com*/
import com.tassioauad.androiditunesclientlibrary.service.parameter.key.Key;
import com.tassioauad.androiditunesclientlibrary.service.parameter.key.ParameterKeyInterface;
import com.tassioauad.androiditunesclientlibrary.service.parameter.value.AttributeValue;
import com.tassioauad.androiditunesclientlibrary.service.parameter.value.EntityValue;
import com.tassioauad.androiditunesclientlibrary.service.parameter.value.MediaValue;
import com.tassioauad.androiditunesclientlibrary.service.parameter.value.ParameterValueInterface;

/**
 * Created by Tssio on 21/05/2014.
 */
public class BasicParameter implements ParameterInterface {

    private String key;
    private String value;

    public BasicParameter() {
    }

    public BasicParameter(AttributeValue attributeValue) {
        key = Key.ATTRIBUTE.getValue();
        value = attributeValue.getValue();
    }

    public BasicParameter(EntityValue entityValue) {
        key = Key.ENTITY.getValue();
        value = entityValue.getValue();
    }

    public BasicParameter(MediaValue mediaValue) {
        key = Key.MEDIA.getValue();
        value = mediaValue.getValue();
    }

    public BasicParameter(String key, ParameterValueInterface value) {
        this.key = key;
        this.value = value.getValue();
    }

    public BasicParameter(String key, String value) {
        this.key = key;
        this.value = value;
    }

    public BasicParameter(Key key, String value) {
        this.key = key.getValue();
        this.value = value;
    }

    @Override
    public void setKey(String key) {
        this.key = key;
    }

    @Override
    public void setValue(String value) {
        this.value = value;
    }

    @Override
    public void setKey(ParameterKeyInterface key) {
        this.key = key.getValue();
    }

    @Override
    public void setValue(ParameterValueInterface value) {
        this.value = value.getValue();
    }

    @Override
    public void setKeyValue(ParameterKeyInterface key, ParameterValueInterface value){
        this.key = key.getValue();
        this.value = value.getValue();
    }

    @Override
    public String getKey() {
        return key;
    }

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String toUrlFormat() {
        return key + "=" + value;
    }
}




Java Source Code List

com.tassioauad.androiditunesclientlibrary.ApplicationTest.java
com.tassioauad.androiditunesclientlibrary.ApplicationTest.java
com.tassioauad.androiditunesclientlibrary.MainActivity.java
com.tassioauad.androiditunesclientlibrary.core.OnApiResultListener.java
com.tassioauad.androiditunesclientlibrary.core.PodcastApiImpl.java
com.tassioauad.androiditunesclientlibrary.core.PodcastApi.java
com.tassioauad.androiditunesclientlibrary.service.PodcastEntriesAsyncTask.java
com.tassioauad.androiditunesclientlibrary.service.SearchPodcastAsyncTask.java
com.tassioauad.androiditunesclientlibrary.service.entity.Category.java
com.tassioauad.androiditunesclientlibrary.service.entity.Content.java
com.tassioauad.androiditunesclientlibrary.service.entity.MediaGroup.java
com.tassioauad.androiditunesclientlibrary.service.entity.PodcastEntity.java
com.tassioauad.androiditunesclientlibrary.service.entity.PodcastEntryEntity.java
com.tassioauad.androiditunesclientlibrary.service.parameter.BasicParameter.java
com.tassioauad.androiditunesclientlibrary.service.parameter.BasicParametersList.java
com.tassioauad.androiditunesclientlibrary.service.parameter.ParameterInterface.java
com.tassioauad.androiditunesclientlibrary.service.parameter.ParametersListInterface.java
com.tassioauad.androiditunesclientlibrary.service.parameter.UrlConvertionInterface.java
com.tassioauad.androiditunesclientlibrary.service.parameter.key.Key.java
com.tassioauad.androiditunesclientlibrary.service.parameter.key.ParameterKeyInterface.java
com.tassioauad.androiditunesclientlibrary.service.parameter.value.AttributeValue.java
com.tassioauad.androiditunesclientlibrary.service.parameter.value.EntityValue.java
com.tassioauad.androiditunesclientlibrary.service.parameter.value.MediaValue.java
com.tassioauad.androiditunesclientlibrary.service.parameter.value.ParameterValueInterface.java
com.tassioauad.androiditunesclientlibrary.service.utils.ItunesSearchApiUrlBuilder.java