Package com.atlassian.adf.model.node
Interface InlineCard.UrlOrData
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaccept(Consumer<? super String> ifUrl, Consumer<? super Map<String,?>> ifData)Do something with either the URI or JSON-LD data, as appropriate.Optional<Map<String,?>>data()Return the JSON-LD data, if that is the form that the link was provided in.<T> Tfold(Function<? super String,? extends T> ifUrl, Function<? super Map<String,?>,? extends T> ifData)Transforms the link data into a desired resulting output form.Optional<String>url()Return theurlproperty, if that is the form that the link was provided in.
-
-
-
Method Detail
-
fold
<T> T fold(Function<? super String,? extends T> ifUrl, Function<? super Map<String,?>,? extends T> ifData)
Transforms the link data into a desired resulting output form. This method provides theurlvalue as a raw string without verifying that it is a valid URI.- Specified by:
foldin interfaceFold2<String,Map<String,?>>- Type Parameters:
T- the inferred output data type of the mappings- Parameters:
ifUrl- the mapping to be applied if the link data is in the URI format.ifData- the mapping to be applied if the link data is in JSON-LD format.- Returns:
- the result of applying the appropriate mapping function
-
accept
void accept(Consumer<? super String> ifUrl, Consumer<? super Map<String,?>> ifData)
Do something with either the URI or JSON-LD data, as appropriate. This method provides theurlvalue as a raw string without verifying that it is a valid URI.
-
url
Optional<String> url()
Return theurlproperty, if that is the form that the link was provided in.- Returns:
- the
urlproperty, if that is the form that the link was provided in; otherwiseempty().
-
-