org.codehaus.httpcache4j.AuthDirective Maven / Gradle / Ivy
The newest version!
package org.codehaus.httpcache4j;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author Erlend Hamnaberg
*/
public class AuthDirective extends Directive {
public AuthDirective(final String name, String value) {
super(name, value);
}
public AuthDirective(final String name, String value, List parameters) {
super(name, value, parameters);
}
@Override
public String toString() {
String output = name;
if (!value.isEmpty()) {
output += " " + value;
}
if (!getParameters().isEmpty()) {
output = output + " " + getParameters().stream().map(Parameter::toString).collect(Collectors.joining(", "));
}
return output;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy