valueFrom

public Optional<T> valueFrom(FieldContext context)

Takes the value of the option from the given descriptor, given the specified context.

The value is firstly obtained from the external constraint and if an external constraint is not present, the value is obtained from the actual field constraint.

Return

an Optional with an option value if such exists, otherwise an empty Optional

Parameters

context

context of the field