package com.atlassian.bitbucket.repository.ref.restriction;

import javax.annotation.Nonnull;

/**
 * Implements the visitor pattern for {@link AccessGrant access grants}.
 * <p>
 * Note: Implementors are <i>strongly</i> encouraged to extend from {@link AbstractAccessGrantVisitor}.
 * This interface <i>may</i> change over time, as more access grant types are added, and any class implementing it
 * directly will be broken by such changes. Extending from the abstract class will help prevent such breakages.
 */
public interface AccessGrantVisitor<T> {

    T visit(@Nonnull GroupAccessGrant grant);

    T visit(@Nonnull UserAccessGrant grant);
}
