All Downloads are FREE. Search and download functionalities are using the official Maven repository.

hr.com.vgv.verano.http.response.Status Maven / Gradle / Ivy

There is a newer version: 0.41
Show newest version
package hr.com.vgv.verano.http.response;

import org.cactoos.Text;

import hr.com.vgv.verano.http.Dict;
import hr.com.vgv.verano.http.DictInput;
import hr.com.vgv.verano.http.KvpOf;

public class Status extends DictInput.Simple
{
    private static final String KEY = "status";

    public Status(Integer status)
    {
        this(status.toString());
    }

    public Status(String status)
    {
        super(new KvpOf(Status.KEY, status));
    }

    public static class Of implements Text
    {
        private final Dict dict;

        public Of(Dict dict)
        {
            this.dict = dict;
        }

        @Override
        public final String asString()
        {
            return dict.get(KEY);
        }

        public final int intValue()
        {
            return Integer.parseInt(this.asString());
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy