@Immutable public static final class CommonsMock.Param extends Object
| Constructor and Description |
|---|
Param(String sParamName,
Class<T> aParamClass,
Supplier<T> aDefaultValueSupplier)
Constructor for a mock parameter
|
| Modifier and Type | Method and Description |
|---|---|
static CommonsMock.Param |
createConstant(String sParamName,
boolean bDefault) |
static <T> CommonsMock.Param |
createConstant(String sParamName,
Class<T> aParamClass,
T aDefault)
Create a
CommonsMock.Param with a constant default value. |
IGetterDirectTrait |
getDefaultValue() |
Class<?> |
getParamClass() |
String |
getParamName() |
String |
toString() |
public Param(@Nonnull @Nonempty String sParamName, @Nonnull Class<T> aParamClass, @Nonnull Supplier<T> aDefaultValueSupplier)
sParamName - Name of the parameter - informational only. May neither be
null nor empty.aParamClass - The class of the parameter. May neither be null nor
empty.aDefaultValueSupplier - The default value supplier in case the caller did not provide an
argument. May not be null.@Nonnull public IGetterDirectTrait getDefaultValue()
@Nonnull public static CommonsMock.Param createConstant(@Nonnull @Nonempty String sParamName, boolean bDefault)
@Nonnull public static <T> CommonsMock.Param createConstant(@Nonnull @Nonempty String sParamName, @Nonnull Class<T> aParamClass, @Nullable T aDefault)
CommonsMock.Param with a constant default value.sParamName - Parameter name. May neither be null nor empty.aParamClass - The parameter class. May not be null.aDefault - The constant default value to be used. May be null.CommonsMock.Param object and never null.Copyright © 2014–2019 Philip Helger. All rights reserved.