package com.atlassian.bitbucket.mesh.credentials;

import javax.annotation.Nonnull;

public interface CredentialsVisitor<T> {

    default T visit(@Nonnull UsernamePasswordCredentials credentials) {
        return defaultValue();
    }

    default T visit(@Nonnull PrivateKeyCredentials credentials) {
        return defaultValue();
    }

    default T defaultValue() {
        return null;
    }
}
