Package io.imagekit.models
Class Transformation.Sharpen
-
- All Implemented Interfaces:
public final class Transformation.SharpenSharpens the input image, highlighting edges and finer details. Pass
truefor default sharpening, or provide a numeric value for custom sharpening. See Sharpen.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceTransformation.Sharpen.VisitorAn interface that defines how to map each variant of Sharpen to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<JsonValue>true_()final Optional<Double>number()final BooleanisTrue()final BooleanisNumber()final JsonValueasTrue()final DoubleasNumber()final Optional<JsonValue>_json()final <T extends Any> Taccept(Transformation.Sharpen.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final Transformation.Sharpenvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static Transformation.SharpenofTrue()final static Transformation.SharpenofNumber(Double number)-
-
Method Detail
-
accept
final <T extends Any> T accept(Transformation.Sharpen.Visitor<T> visitor)
Maps this instance's current variant to a value of type T using the given visitor.
Note that this method is not forwards compatible with new variants from the API, unless visitor overrides Visitor.unknown. To handle variants not known to this version of the SDK gracefully, consider overriding Visitor.unknown:
import io.imagekit.core.JsonValue; import java.util.Optional; Optional<String> result = sharpen.accept(new Sharpen.Visitor<Optional<String>>() { @Override public Optional<String> visitTrue(JsonValue true_) { return Optional.of(true_.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final Transformation.Sharpen validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
ofTrue
final static Transformation.Sharpen ofTrue()
-
ofNumber
final static Transformation.Sharpen ofNumber(Double number)
-
-
-
-