public abstract class StructuredDataProcessor extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StructuredDataProcessor.ProcessedValue<T> |
static class |
StructuredDataProcessor.ProcessResults
Accumulates the list of literal field paths and a rough size estimation for
StructuredDataProcessor |
| Modifier | Constructor and Description |
|---|---|
protected |
StructuredDataProcessor() |
| Modifier and Type | Method and Description |
|---|---|
static int |
estimateStringSize(String value)
this is copied from
StringDimensionDictionary.estimateSizeOfValue(String) |
static int |
getDoubleObjectEstimateSize() |
static int |
getLongObjectEstimateSize() |
abstract StructuredDataProcessor.ProcessedValue<?> |
processArrayField(ArrayList<NestedPathPart> fieldPath,
List<?> array)
Process a
List or Object[] returning a StructuredDataProcessor.ProcessedValue if no further processing should
be performed by the StructuredDataProcessor, else a return value of null indicates that each element
of the array will be processed separately as a new NestedPathArrayElement part. |
abstract StructuredDataProcessor.ProcessedValue<?> |
processField(ArrayList<NestedPathPart> fieldPath,
Object fieldValue)
|
StructuredDataProcessor.ProcessResults |
processFields(Object raw)
Process some object, traversing any nested structure and returning a list of all paths which created a
StructuredDataProcessor.ProcessedValue during processing, represented as an ordered sequence of NestedPathPart. |
public abstract StructuredDataProcessor.ProcessedValue<?> processField(ArrayList<NestedPathPart> fieldPath, @Nullable Object fieldValue)
@Nullable public abstract StructuredDataProcessor.ProcessedValue<?> processArrayField(ArrayList<NestedPathPart> fieldPath, @Nullable List<?> array)
List or Object[] returning a StructuredDataProcessor.ProcessedValue if no further processing should
be performed by the StructuredDataProcessor, else a return value of null indicates that each element
of the array will be processed separately as a new NestedPathArrayElement part.public StructuredDataProcessor.ProcessResults processFields(Object raw)
StructuredDataProcessor.ProcessedValue during processing, represented as an ordered sequence of NestedPathPart.
This method processes plain java objects, for each Map it adds a MapField to the path, for
List a ArrayField, Object[] a ArrayField, and so on. ArrayField and
ArrayField will be processed by processArrayField(ArrayList, List)public static int estimateStringSize(@Nullable String value)
StringDimensionDictionary.estimateSizeOfValue(String)public static int getLongObjectEstimateSize()
public static int getDoubleObjectEstimateSize()
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.