public class PepperModuleProperty<T> extends Object implements Comparable<PepperModuleProperty<?>>, Serializable
PepperModuleProperty.create().withName("MyProp").withType(String.class)
.withDescription("Please describe the property for the user. ")
.withDefaultValue("theDefaultWhenNoValueIsSet").isRequired(false).build();
| Modifier and Type | Class and Description |
|---|---|
static class |
PepperModuleProperty.NameBuilder |
| Constructor and Description |
|---|
PepperModuleProperty(String name,
Class<T> clazz,
String description)
Deprecated.
will be removed with Pepper 4.0
|
PepperModuleProperty(String name,
Class<T> clazz,
String description,
boolean required)
Deprecated.
will be removed with Pepper 4.0
|
PepperModuleProperty(String name,
Class<T> clazz,
String description,
T defaultValue)
Deprecated.
will be removed with Pepper 4.0
|
PepperModuleProperty(String name,
Class<T> clazz,
String description,
T defaultValue,
boolean required)
Deprecated.
the visibility of this method will be set to private
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PepperModuleProperty<?> o) |
static PepperModuleProperty.NameBuilder |
create() |
boolean |
equals(Object obj) |
T |
getDefaultValue() |
String |
getDescription() |
String |
getName() |
Class<T> |
getType() |
T |
getValue() |
int |
hashCode() |
boolean |
isRequired() |
void |
setValue(T value) |
void |
setValueString(String value)
Sets the given value to the internal one.
|
String |
toString() |
@Deprecated public PepperModuleProperty(String name, Class<T> clazz, String description)
@Deprecated public PepperModuleProperty(String name, Class<T> clazz, String description, T defaultValue)
@Deprecated public PepperModuleProperty(String name, Class<T> clazz, String description, boolean required)
@Deprecated public PepperModuleProperty(String name, Class<T> clazz, String description, T defaultValue, boolean required)
PepperModuleProperty instance and sets its values to
the given ones.name - name of the propertyclazz - the propertys classdescription - a description to the propertydefaultValue - sets a default value if no one is setrequired - determines if the property is required (true means property is
required)public String getName()
public String getDescription()
public boolean isRequired()
public void setValue(T value)
public T getValue()
public final T getDefaultValue()
public void setValueString(String value)
value - consumes the given String parameter and transforms itpublic int compareTo(PepperModuleProperty<?> o)
compareTo in interface Comparable<PepperModuleProperty<?>>public static PepperModuleProperty.NameBuilder create()
Copyright © 2009–2021 Humboldt-Universität zu Berlin, INRIA. All rights reserved.