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

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

There is a newer version: 1.6.8
Show newest version
package org.zodiac.actuate.health;

import org.springframework.util.Assert;

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) {
        Assert.notNull(name, "Name must not be null");
        Assert.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