public interface Example extends Constructible, Extensible<Example>, Reference<Example>
An object containing sample data for the related object.
In all cases, the example value is expected to be compatible with the type schema of its associated value. Tooling implementations MAY choose to validate compatibility automatically, and reject the example value(s) if incompatible.
Modifier and Type | Method and Description |
---|---|
default Example |
description(java.lang.String description)
Sets this Example's description property to the given string.
|
default Example |
externalValue(java.lang.String externalValue)
Sets this Example's externalValue property to the given string.
|
java.lang.String |
getDescription()
Returns the description property from an Example instance.
|
java.lang.String |
getExternalValue()
Returns the externalValue property from an Example instance.
|
java.lang.String |
getSummary()
Returns the summary property from an Example instance.
|
java.lang.Object |
getValue()
Returns the value property from an Example instance.
|
void |
setDescription(java.lang.String description)
Sets this Example's description property to the given string.
|
void |
setExternalValue(java.lang.String externalValue)
Sets this Example's externalValue property to the given string.
|
void |
setSummary(java.lang.String summary)
Sets this Example's summary property to the given string.
|
void |
setValue(java.lang.Object value)
Sets this Example's value property to the given value.
|
default Example |
summary(java.lang.String summary)
Sets this Example's summary property to the given string.
|
default Example |
value(java.lang.Object value)
Sets this Example's value property to the given value.
|
addExtension, extensions, getExtensions, removeExtension, setExtensions
java.lang.String getSummary()
void setSummary(java.lang.String summary)
summary
- short description of the exampledefault Example summary(java.lang.String summary)
summary
- short description of the examplejava.lang.String getDescription()
void setDescription(java.lang.String description)
description
- long description of the exampledefault Example description(java.lang.String description)
description
- long description of the examplejava.lang.Object getValue()
void setValue(java.lang.Object value)
value
- a literal example objectdefault Example value(java.lang.Object value)
value
- a literal example objectjava.lang.String getExternalValue()
void setExternalValue(java.lang.String externalValue)
externalValue
- URL that points to the literal exampledefault Example externalValue(java.lang.String externalValue)
externalValue
- URL that points to the literal example