Skip to main content
Version: v1

Interval Class

Signature​

export declare class Interval implements ISerializableInterval

Implements: ISerializableInterval

Constructors​

ConstructorDescription
(constructor)(start, end, props)Constructs a new instance of the Interval class

Properties​

PropertyTypeDescription
auxPropsPropertySet[]
endnumber
propertiesPropertySet
propertyManagerPropertiesManager
startnumber

Methods​

MethodReturn TypeDescription
addProperties(newProps, collaborating, seq, op)PropertySet | undefined
addPropertySet(props)void
clone()Interval
compare(b)number
compareEnd(b)number
compareStart(b)number
getAdditionalPropertySets()PropertySet[]
getIntervalId()string | undefined
getProperties()PropertySet
modify(label, start, end, op)Interval
overlaps(b)boolean
serialize(client)ISerializedInterval
union(b)Interval

Constructor Details​

(constructor)​

Constructs a new instance of the Interval class

Signature​

constructor(start: number, end: number, props?: PropertySet);

Parameters​

ParameterModifiersTypeDescription
startnumber
endnumber
propsoptionalPropertySet

Property Details​

auxProps​

Signature​

auxProps: PropertySet[];

Type: PropertySet[]

end​

Signature​

end: number;

Type: number

properties​

Signature​

properties: PropertySet;

Type: PropertySet

propertyManager​

Signature​

propertyManager: PropertiesManager;

Type: PropertiesManager

start​

Signature​

start: number;

Type: number

Method Details​

addProperties​

Signature​

addProperties(newProps: PropertySet, collaborating?: boolean, seq?: number, op?: ICombiningOp): PropertySet | undefined;

Parameters​

ParameterModifiersTypeDescription
newPropsPropertySet
collaboratingoptionalboolean
seqoptionalnumber
opoptionalICombiningOp

Returns​

Return type: PropertySet | undefined

addPropertySet​

Signature​

addPropertySet(props: PropertySet): void;

Parameters​

ParameterTypeDescription
propsPropertySet

clone​

Signature​

clone(): Interval;

Returns​

Return type: Interval

compare​

Signature​

compare(b: Interval): number;

Parameters​

ParameterTypeDescription
bInterval

Returns​

Return type: number

compareEnd​

Signature​

compareEnd(b: Interval): number;

Parameters​

ParameterTypeDescription
bInterval

Returns​

Return type: number

compareStart​

Signature​

compareStart(b: Interval): number;

Parameters​

ParameterTypeDescription
bInterval

Returns​

Return type: number

getAdditionalPropertySets​

Signature​

getAdditionalPropertySets(): PropertySet[];

Returns​

Return type: PropertySet[]

getIntervalId​

Signature​

getIntervalId(): string | undefined;

Returns​

Return type: string | undefined

getProperties​

Signature​

getProperties(): PropertySet;

Returns​

Return type: PropertySet

modify​

Signature​

modify(label: string, start: number, end: number, op?: ISequencedDocumentMessage): Interval;

Parameters​

ParameterModifiersTypeDescription
labelstring
startnumber
endnumber
opoptionalISequencedDocumentMessage

Returns​

Return type: Interval

overlaps​

Signature​

overlaps(b: Interval): boolean;

Parameters​

ParameterTypeDescription
bInterval

Returns​

Return type: boolean

serialize​

Signature​

serialize(client: Client): ISerializedInterval;

Parameters​

ParameterTypeDescription
clientClient

Returns​

Return type: ISerializedInterval

union​

Signature​

union(b: Interval): Interval;

Parameters​

ParameterTypeDescription
bInterval

Returns​

Return type: Interval