All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.zodiac.actuate.health.AppNamedContributor Maven / Gradle / Ivy

The newest version!
package org.zodiac.actuate.health;

import org.zodiac.sdk.toolkit.util.AssertUtil;

public interface AppNamedContributor {

    /**
     * Returns the name of the contributor.
     * 
     * @return The contributor name
     */
    String getName();

    /**
     * Returns the contributor instance.
     * 
     * @return The contributor instance
     */
    C getContributor();

    static  AppNamedContributor of(String name, C contributor) {
        AssertUtil.notNull(name, "Name must not be null");
        AssertUtil.notNull(contributor, "Contributor must not be null");
        return new AppNamedContributor() {

            @Override
            public String getName() {
                return name;
            }

            @Override
            public C getContributor() {
                return contributor;
            }

        };
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy