Module com.speedment.common.codegen
Interface HasValue<T extends HasValue<T>>
-
- Type Parameters:
T- the extending type
- All Known Subinterfaces:
AnnotationUsage,Field,InterfaceField
- All Known Implementing Classes:
DefaultAnnotationUsage
public interface HasValue<T extends HasValue<T>>A trait for models that has aValue.- Since:
- 2.0.0
- Author:
- Emil Forslund
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Optional<Value<?>>getValue()Returns the value of this model.Tset(Value<?> val)Sets the value of this model.default Tset(Boolean val)Sets the value of this model to a newBooleanValueholding the specifiedBoolean.default Tset(Number val)Sets the value of this model to a newNumberValueholding the specifiedNumber.default Tset(String val)Sets the value of this model to a newTextValueholding the specifiedString.
-
-
-
Method Detail
-
set
T set(Value<?> val)
Sets the value of this model.- Parameters:
val- the new value- Returns:
- a reference to this
-
set
default T set(String val)
Sets the value of this model to a newTextValueholding the specifiedString.- Parameters:
val- the new value- Returns:
- a reference to this
-
set
default T set(Number val)
Sets the value of this model to a newNumberValueholding the specifiedNumber.- Parameters:
val- the new value- Returns:
- a reference to this
-
set
default T set(Boolean val)
Sets the value of this model to a newBooleanValueholding the specifiedBoolean.- Parameters:
val- the new value- Returns:
- a reference to this
-
-