com.natpryce.makeiteasy.PropertyLookup Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of make-it-easy Show documentation
Show all versions of make-it-easy Show documentation
A tiny framework that makes it easy to write Test Data Builders in Java
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 super T,V> 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 super T,V> property, Donor extends V> defaultValueDonor);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy