Package org.forgerock.json
Class JsonValueTraverseFunction
- java.lang.Object
- 
- org.forgerock.json.JsonValueTraverseFunction
 
- 
- All Implemented Interfaces:
- Function<JsonValue,JsonValue,JsonValueException>
 
 public class JsonValueTraverseFunction extends Object implements Function<JsonValue,JsonValue,JsonValueException> 
- 
- 
Constructor SummaryConstructors Constructor Description JsonValueTraverseFunction(Function<JsonValue,?,JsonValueException> transform)Construct the traversal function with a transformation function to apply to each array element nested object attribute value element, or primitive element.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValueapply(JsonValue value)Applies this function to the input parametervalueand returns the result.protected ObjecttraverseList(JsonValue value)Transform a JsonValue List into another object.protected ObjecttraverseMap(JsonValue value)Transform a JsonValue Map into another object.
 
- 
- 
- 
Constructor Detail- 
JsonValueTraverseFunctionpublic JsonValueTraverseFunction(Function<JsonValue,?,JsonValueException> transform) Construct the traversal function with a transformation function to apply to each array element nested object attribute value element, or primitive element.- Parameters:
- transform- a transformation function
 
 
- 
 - 
Method Detail- 
applypublic final JsonValue apply(JsonValue value) Description copied from interface:FunctionApplies this function to the input parametervalueand returns the result.- Specified by:
- applyin interface- Function<JsonValue,JsonValue,JsonValueException>
- Parameters:
- value- The input parameter.
- Returns:
- The result of applying this function to value.
 
 - 
traverseListprotected Object traverseList(JsonValue value) Transform a JsonValue List into another object. Default implementation is to return a newArrayListfilled with the elements on which we applied the transformations.- Parameters:
- value- the value to transform
- Returns:
- the transformed value
 
 - 
traverseMapprotected Object traverseMap(JsonValue value) Transform a JsonValue Map into another object. Default implementation is to return a newLinkedHashMapfilled with the elements on which we applied the transformations.- Parameters:
- value- the value to transform
- Returns:
- the transformed value
 
 
- 
 
-