class ResponseImpl extends Response {

    @Override
    public Set<Link> getLinks() {
        List<Object> links = getMetadata().get(LINK);
        if (links == null) {
            return Collections.emptySet();
        }
        Set<Link> linkSet = new LinkedHashSet<>();
        for (Object value : links) {
            if (value instanceof Link) {
                linkSet.add((Link)value);
            } else {
                linkSet.add(Link.valueOf(value instanceof String ? (String)value : getHeaderAsString(value)));
            }
        }
        return linkSet;
    }

    protected  ResponseImpl(int status, Object entity, Annotation[] entityAnnotations, MultivaluedMap<String, Object> headers);

}