Interval Class
Signature
export declare class Interval implements ISerializableInterval
Implements: ISerializableInterval
Constructors
Constructor | Description |
---|---|
(constructor)(start, end, props) | Constructs a new instance of the Interval class |
Properties
Property | Type | Description |
---|---|---|
auxProps | PropertySet[] | |
end | number | |
properties | PropertySet | |
propertyManager | PropertiesManager | |
start | number |
Methods
Method | Return Type | Description |
---|---|---|
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
Parameter | Modifiers | Type | Description |
---|---|---|---|
start | number | ||
end | number | ||
props | optional | PropertySet |
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
Parameter | Modifiers | Type | Description |
---|---|---|---|
newProps | PropertySet | ||
collaborating | optional | boolean | |
seq | optional | number | |
op | optional | ICombiningOp |
Returns
Return type: PropertySet | undefined
addPropertySet
Signature
addPropertySet(props: PropertySet): void;
Parameters
Parameter | Type | Description |
---|---|---|
props | PropertySet |
clone
Signature
clone(): Interval;
Returns
Return type: Interval
compare
Signature
compare(b: Interval): number;
Parameters
Parameter | Type | Description |
---|---|---|
b | Interval |
Returns
Return type: number
compareEnd
Signature
compareEnd(b: Interval): number;
Parameters
Parameter | Type | Description |
---|---|---|
b | Interval |
Returns
Return type: number
compareStart
Signature
compareStart(b: Interval): number;
Parameters
Parameter | Type | Description |
---|---|---|
b | Interval |
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
Parameter | Modifiers | Type | Description |
---|---|---|---|
label | string | ||
start | number | ||
end | number | ||
op | optional | ISequencedDocumentMessage |
Returns
Return type: Interval
overlaps
Signature
overlaps(b: Interval): boolean;
Parameters
Parameter | Type | Description |
---|---|---|
b | Interval |
Returns
Return type: boolean
serialize
Signature
serialize(client: Client): ISerializedInterval;
Parameters
Parameter | Type | Description |
---|---|---|
client | Client |
Returns
Return type: ISerializedInterval
union
Signature
union(b: Interval): Interval;
Parameters
Parameter | Type | Description |
---|---|---|
b | Interval |
Returns
Return type: Interval