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

com.natpryce.makeiteasy.PropertyLookup Maven / Gradle / Ivy

There is a newer version: 4.0.1
Show newest version
package com.natpryce.makeiteasy;

/**
 * Looks up property values.
 * 
 * @param  type type of object for which the properties apply.
 */
public interface PropertyLookup {
    /**
     *
     * @param property the property for which a value will be returned
     * @param defaultValue the default value to use if no value can be found
     * @param  the type of the value
     * @return the value for the given property, or defaultValue if no value can be found.
     */
     V valueOf(Property property, V defaultValue);
    
    /**
     *
     * @param property the property for which a value will be returned
     * @param defaultValueDonor an object that can provide the default value to use if no value can be found
     * @param  the type of the value
     * @return the value for the given property, or defaultValueDonor.value() if no value can be found.
     */
     V valueOf(Property property, Donor defaultValueDonor);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy