Class OverlayTiming.End
-
- All Implemented Interfaces:
public final class OverlayTiming.EndSpecifies the end time (in seconds) for when the overlay should disappear from the base video. If both end and duration are provided, duration is ignored. Accepts a positive number up to two decimal places (e.g.,
20or20.50) and arithmetic expressions such asbdu_mul_0.4orbdu_sub_idu. Applies only if the base asset is a video. Maps toleoin the URL.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceOverlayTiming.End.VisitorAn interface that defines how to map each variant of End to a value of type T.
-
Method Summary
Modifier and Type Method Description final Optional<Double>number()final Optional<String>string()final BooleanisNumber()final BooleanisString()final DoubleasNumber()final StringasString()final Optional<JsonValue>_json()final <T extends Any> Taccept(OverlayTiming.End.Visitor<T> visitor)Maps this instance's current variant to a value of type T using the given visitor. final OverlayTiming.Endvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static OverlayTiming.EndofNumber(Double number)final static OverlayTiming.EndofString(String string)-
-
Method Detail
-
accept
final <T extends Any> T accept(OverlayTiming.End.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 = end.accept(new End.Visitor<Optional<String>>() { @Override public Optional<String> visitNumber(Double number) { return Optional.of(number.toString()); } // ... @Override public Optional<String> unknown(JsonValue json) { // Or inspect the `json`. return Optional.empty(); } });
-
validate
final OverlayTiming.End 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.
-
ofNumber
final static OverlayTiming.End ofNumber(Double number)
-
ofString
final static OverlayTiming.End ofString(String string)
-
-
-
-