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

com.firefly.codec.http2.model.StaticTableHttpField Maven / Gradle / Ivy

The newest version!
package com.firefly.codec.http2.model;

public class StaticTableHttpField extends HttpField {
    private final Object value;

    public StaticTableHttpField(HttpHeader header, String name,
                                String valueString, Object value) {
        super(header, name, valueString);
        if (value == null)
            throw new IllegalArgumentException();
        this.value = value;
    }

    public StaticTableHttpField(HttpHeader header, String valueString,
                                Object value) {
        this(header, header.asString(), valueString, value);
    }

    public StaticTableHttpField(String name, String valueString, Object value) {
        super(name, valueString);
        if (value == null)
            throw new IllegalArgumentException();
        this.value = value;
    }

    public Object getStaticValue() {
        return value;
    }

    @Override
    public String toString() {
        return super.toString() + "(evaluated)";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy