UNPKG

dmclc

Version:

Dolphin Minecraft Launcher Core

59 lines (58 loc) 2.4 kB
import { Version } from "./Version.js"; /** * Representation of a version interval, closed or open. * * <p>The represented version interval is contiguous between its lower and upper limit, disjoint intervals are built * using collections of {@link VersionInterval}. Empty intervals may be represented by {@code null} or any interval * @code (x,x)} with x being a non-{@code null} version and both endpoints being exclusive. */ export declare abstract class VersionInterval { /** * Get whether the interval uses {@link SemanticVersion} compatible bounds. * * @return True if both bounds are open (null), {@link SemanticVersion} instances or a combination of both, false otherwise. */ abstract isSemantic(): boolean; /** * Get the lower limit of the version interval. * * @return Version's lower limit or null if none, inclusive depending on {@link #isMinInclusive()} */ abstract getMin(): Version | undefined; /** * Get whether the lower limit of the version interval is inclusive. * * @return True if inclusive, false otherwise */ abstract isMinInclusive(): boolean; /** * Get the upper limit of the version interval. * * @return Version's upper limit or null if none, inclusive depending on {@link #isMaxInclusive()} */ abstract getMax(): Version | undefined; /** * Get whether the upper limit of the version interval is inclusive. * * @return True if inclusive, false otherwise */ abstract isMaxInclusive(): boolean; and(o: VersionInterval): VersionInterval | undefined; or(o: VersionInterval[]): VersionInterval[]; not(): VersionInterval[]; /** * Compute the intersection between two version intervals. */ static andOne(a: VersionInterval, b: VersionInterval): VersionInterval | undefined; /** * Compute the intersection between two potentially disjoint of version intervals. */ static and(a: VersionInterval[], b: VersionInterval[]): VersionInterval[] | undefined; /** * Compute the union between multiple version intervals. */ static or(a: VersionInterval[], b: VersionInterval): VersionInterval[]; static notOne(interval: VersionInterval): VersionInterval[]; static not(intervals: VersionInterval[]): VersionInterval[] | undefined; abstract equals(obj: unknown): boolean; }