public final class ResourceIdentifierUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T extends io.sphere.sdk.models.Referenceable<S>,S> |
toResourceIdentifierIfNotNull(T resource)
Given a
Referenceable resource of the type T, if it is not null, this method applies the
Referenceable.toResourceIdentifier() method to return it as a ResourceIdentifier of
the type T. |
@Nullable
public static <T extends io.sphere.sdk.models.Referenceable<S>,S> io.sphere.sdk.models.ResourceIdentifier<S> toResourceIdentifierIfNotNull(@Nullable
T resource)
Referenceable resource of the type T, if it is not null, this method applies the
Referenceable.toResourceIdentifier() method to return it as a ResourceIdentifier of
the type T. If it is null, this method returns null.T - type of the resource supplied.S - represents the type of the ResourceIdentifier returned.resource - represents the resource to return as a ResourceIdentifier if not null.ResourceIdentifier if not null. If it is null,
this method returns null.