class AbstractRequireElementAuthorizer<E extends Object> extends ProfileAuthorizer {

    protected Set<E> elements;

    /** {@inheritDoc} */
    @Override
    public boolean isAuthorized(final WebContext context, final SessionStore sessionStore, final List<UserProfile> profiles) {
        return isAnyAuthorized(context, sessionStore, profiles);
    }

    /**
     * Check a specific element.
     *
     * @param context the web context
     * @param sessionStore the session store
     * @param profile the profile
     * @param element the element to check
     * @return whether it is authorized for this element
     */
    protected abstract boolean check(final WebContext context, final SessionStore sessionStore,
                                     final UserProfile profile, final E element);

    /**
     * <p>Getter for the field <code>elements</code>.</p>
     *
     * @return a {@link Set} object
     */
    public Set<E> getElements() {
        return elements;
    }

    /**
     * <p>Setter for the field <code>elements</code>.</p>
     *
     * @param elements a {@link Set} object
     */
    public void setElements(final Set<E> elements) {
        this.elements = elements;
    }

    /**
     * <p>Setter for the field <code>elements</code>.</p>
     *
     * @param elements a {@link List} object
     */
    public void setElements(final List<E> elements) {<FILL_FUNCTION_BODY>}

    /**
     * <p>Setter for the field <code>elements</code>.</p>
     *
     * @param elements a E object
     */
    public void setElements(final E... elements) {
        if (elements != null) {
            setElements(Arrays.asList(elements));
        }
    }
}

        if (elements != null) {
            this.elements = new HashSet<>(elements);
        }
    
<methods>public non-sealed void <init>() ,public boolean isAllAuthorized(org.pac4j.core.context.WebContext, org.pac4j.core.context.session.SessionStore, Iterable<org.pac4j.core.profile.UserProfile>) ,public boolean isAnyAuthorized(org.pac4j.core.context.WebContext, org.pac4j.core.context.session.SessionStore, Iterable<org.pac4j.core.profile.UserProfile>) <variables>