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

com.moon.core.model.getter.KeyValueGetter Maven / Gradle / Ivy

package com.moon.core.model.getter;

import java.util.function.Supplier;

/**
 * @author moonsky
 */
public interface KeyValueGetter extends KeyGetter, ValueGetter {

    /**
     * get key
     *
     * @return
     */
    @Override
    String getKey();

    /**
     * get value
     *
     * @return
     */
    @Override
    String getValue();

    /**
     * transfer to a {@link Supplier}
     *
     * @return a new supplier
     */
    @Override
    default Supplier asKeySupplier() { return this::getKey; }

    /**
     * transfer to a {@link Supplier}
     *
     * @return a new supplier
     */
    @Override
    default Supplier asValueSupplier() { return this::getValue; }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy