Class AbstractArrayNodeConversion<T>
java.lang.Object
org.tudalgo.algoutils.tutor.general.conversion.AbstractArrayNodeConversion<T>
- All Implemented Interfaces:
org.junit.jupiter.params.converter.ArgumentConverter
- Direct Known Subclasses:
ArrayConverter.BigDecimal,ArrayConverter.BigDecimal2D,ArrayConverter.BigInteger,ArrayConverter.BigInteger2D,ArrayConverter.Boolean,ArrayConverter.Boolean2D,ArrayConverter.Double,ArrayConverter.Double2D,ArrayConverter.Float,ArrayConverter.Float2D,ArrayConverter.Integer,ArrayConverter.Integer2D,ArrayConverter.Long,ArrayConverter.Long2D,ArrayConverter.Number,ArrayConverter.Number2D,ArrayConverter.Short,ArrayConverter.Short2D,ArrayConverter.String,ArrayConverter.String2D
public abstract class AbstractArrayNodeConversion<T>
extends Object
implements org.junit.jupiter.params.converter.ArgumentConverter
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final AbstractArrayNodeConversion<?>Base conversion (n-1)d array to n-d array. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
baseConverter
Base conversion (n-1)d array to n-d array. The base conversion is null for n=1.
-
-
Constructor Details
-
AbstractArrayNodeConversion
public AbstractArrayNodeConversion() -
AbstractArrayNodeConversion
-
-
Method Details
-
convert
public Object convert(Object source, org.junit.jupiter.api.extension.ParameterContext context) throws org.junit.jupiter.params.converter.ArgumentConversionException - Specified by:
convertin interfaceorg.junit.jupiter.params.converter.ArgumentConverter- Throws:
org.junit.jupiter.params.converter.ArgumentConversionException
-
getBaseConverter
-
convert
public abstract T[] convert(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, org.junit.jupiter.api.extension.ParameterContext context) throws org.junit.jupiter.params.converter.ArgumentConversionException Converts a JSON array into another type.- Parameters:
arrayNode- the JSON array node to be convertedcontext- context in which the parameter is converted- Returns:
- a converted object
- Throws:
org.junit.jupiter.params.converter.ArgumentConversionException- if the conversion fails
-