package io.vertx.ext.web.impl;
import java.util.Collection;
import java.util.List;
import io.vertx.ext.web.LanguageHeader;
import io.vertx.ext.web.MIMEHeader;
import io.vertx.ext.web.ParsedHeaderValue;
import io.vertx.ext.web.ParsedHeaderValues;
public class implements ParsedHeaderValues {
private List<MIMEHeader> ;
private List<ParsedHeaderValue> ;
private List<ParsedHeaderValue> ;
private List<LanguageHeader> ;
private ParsableMIMEValue ;
public (
List<MIMEHeader> accept, List<ParsedHeaderValue> acceptCharset, List<ParsedHeaderValue> acceptEncoding,
List<LanguageHeader> acceptLanguage, ParsableMIMEValue contentType) {
this.accept = accept;
this.acceptCharset = acceptCharset;
this.acceptEncoding = acceptEncoding;
this.acceptLanguage = acceptLanguage;
this.contentType = contentType;
}
@Override
public List<MIMEHeader> () {
return accept;
}
@Override
public List<ParsedHeaderValue> () {
return acceptCharset;
}
@Override
public List<ParsedHeaderValue> () {
return acceptEncoding;
}
@Override
public List<LanguageHeader> () {
return acceptLanguage;
}
@Override
public ParsableMIMEValue () {
return contentType;
}
@Override
public <T extends ParsedHeaderValue> T (List<T> userAccepted, Collection<T> in) {
for (T acceptableType: userAccepted) {
T acceptedType = acceptableType.findMatchedBy(in);
if(acceptedType != null){
return acceptedType;
}
}
return null;
}
}