package org.jboss.resteasy.util;
import javax.ws.rs.core.MultivaluedMap;
import java.util.Set;
public class
{
public static void (MultivaluedMap<String, Object> headers, String[] methods)
{
if (methods == null)
{
headers.remove("Allow");
return;
}
StringBuilder builder = new StringBuilder();
boolean isFirst = true;
for (String l : methods)
{
if (isFirst)
{
isFirst = false;
}
else
{
builder.append(", ");
}
builder.append(l);
}
headers.putSingle("Allow", builder.toString());
}
public static void (MultivaluedMap<String, Object> headers, Set<String> methods)
{
if (methods == null)
{
headers.remove("Allow");
return;
}
StringBuilder builder = new StringBuilder();
boolean isFirst = true;
for (String l : methods)
{
if (isFirst)
{
isFirst = false;
}
else
{
builder.append(", ");
}
builder.append(l);
}
headers.putSingle("Allow", builder.toString());
}
}