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

cn.afterturn.easypoi.wps.entity.resreq.ResponseEntity Maven / Gradle / Ivy

There is a newer version: 3.0.0-M4
Show newest version
package cn.afterturn.easypoi.wps.entity.resreq;

import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;


/**
 * @author noear
 * @since 1.10
 */
public class ResponseEntity {
    T body;
    Map headers;
    int status;

    public T getBody() {
        return body;
    }

    public Map getHeaders() {
        return headers;
    }

    public int getStatus() {
        return status;
    }

    public ResponseEntity(T body, Map headers) {
        this.body = body;
        Map tempHeaders = new LinkedHashMap<>();
        if (headers != null) {
            tempHeaders.putAll(headers);
        }

        this.headers = Collections.unmodifiableMap(tempHeaders);
    }
    public ResponseEntity(T body, Map headers, int status) {
        this(body, headers);
        this.status = status;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy