T
- The class type of the parameter value.@PublicEvolving public class Param<T> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
Class<T> |
clazz |
T |
defaultValue |
String |
description |
String |
name |
ParamValidator<T> |
validator |
Constructor and Description |
---|
Param(String name,
Class<T> clazz,
String description,
T defaultValue,
ParamValidator<T> validator) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
T |
jsonDecode(Object json)
Decodes the given json-supported object into an object of class type T.
|
Object |
jsonEncode(T value)
Encodes the given java object into a json-supported object.
|
String |
toString() |
public final String name
public final String description
public final T defaultValue
public final ParamValidator<T> validator
public Object jsonEncode(T value) throws IOException
value
- A java object of class type T.IOException
public T jsonDecode(Object json) throws IOException
json
- A json-supported object.IOException
Copyright © 2019–2023 The Apache Software Foundation. All rights reserved.