spring-geode/src/main/java/org/springframework/geode/core/io/support/ResourceUtils.java
/**
	 * {@link Optional Optionally} return the {@link Resource} as a {@link WritableResource}.
	 *
	 * The {@link Resource} must be an instance of {@link WritableResource}.
	 *
	 * @param resource {@link Resource} to cast to a {@link WritableResource}.
	 * @return the {@link Resource} as a {@link WritableResource} if the {@link Resource}
	 * is an instance of {@link WritableResource}, otherwise returns {@link Optional#empty()}.
	 * @see org.springframework.core.io.WritableResource
	 * @see org.springframework.core.io.Resource
	 * @see java.util.Optional
	 */
Optional Optionally return the  Resource as a  WritableResource.
The  Resource must be an instance of  WritableResource.

@param resource  Resource to cast to a  WritableResource.
@return the  Resource as a  WritableResource if the  Resource
is an instance of  WritableResource, otherwise returns  Optional#empty().
Optional Optionally return the Resource as a WritableResource . The Resource must be an instance of WritableResource . @param resource Resource to cast to a WritableResource . @return the Resource as a WritableResource if the Resource is an instance of WritableResource otherwise returns Optional#empty () .
public static Optional<WritableResource> asWritableResource(@Nullable Resource resource) {
		return Optional.ofNullable(resource)
			.filter(WritableResource.class::isInstance)
			.map(WritableResource.class::cast);
	}
public static Optional < WritableResource > asWritableResource ( @ Nullable Resource resource ) { return Optional . ofNullable ( resource ) . filter ( WritableResource . class :: isInstance ) . map ( WritableResource . class :: cast ) ; }
{@link Optional Optionally} return the {@link Resource} as a {@link WritableResource}.
{ @link Optional Optionally } return the { @link Resource } as a { @link WritableResource } .