Interface PropertySupplier<T,R>
-
- Type Parameters:
T- type of read valuesR- type of values to set explicitly
- All Known Subinterfaces:
BooleanValuePropertySupplier,ByteValuePropertySupplier,DoubleValuePropertySupplier,EnumPropertySuppler<T>,FloatValuePropertySupplier,IntValuePropertySupplier,LongValuePropertySupplier,MultipleEnumPropertySuppler<T>,MultipleObjectPropertySupplier<R,T>,ObjectByClassPropertySupplier<T>,ObjectPropertySupplier<R,T>,ShortValuePropertySupplier,StringValuePropertySupplier,URLValuePropertySupplier
- All Known Implementing Classes:
DefaultLocaleProperty,DefaultLocalizationEngine,DoCapturesOf,FreeResourcesOnInactivity,FreeResourcesOnInactivityAfter.FreeResourcesOnInactivityAfterTimeUnit,FreeResourcesOnInactivityAfter.FreeResourcesOnInactivityAfterTimeValue,ToLimitReportDepth
public interface PropertySupplier<T,R> extends Supplier<T>, Consumer<R>
Interface to construct classes which read property values
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidaccept(R value)Sets a new value of some system property.default Tget()default StringgetName()Tparse(String value)default StringreadValuesToSet(R value)Converts object to string value of the propertydefault TreturnIfNull()static Optional<String>returnOptionalFromEnvironment(PropertySupplier<?,?> property)
-
-
-
Method Detail
-
returnOptionalFromEnvironment
static Optional<String> returnOptionalFromEnvironment(PropertySupplier<?,?> property)
-
readValuesToSet
default String readValuesToSet(R value)
Converts object to string value of the property- Parameters:
value- to set as a value of the property- Returns:
- value converted to String
-
accept
default void accept(R value)
Sets a new value of some system property. WARNING!!! When there are some additionalPropertySource's and they provide a value of the same property then the accepted value is ignored in favor of externally provided.
-
getName
default String getName()
-
returnIfNull
default T returnIfNull()
-
-