Home Reference Source Repository
import Triple from 'lseqtree/lib/triple.js'
public class | source

Triple

Triple that contains <path; site; counter>. Identifiers of LSEQ are lists of triples.

Constructor Summary

Public Constructor
public

constructor(path: Number, site: Number | String, counter: Number)

Member Summary

Public Members
public

c: *

public

p: *

public

s: *

Method Summary

Public Methods
public

Compare two triples prioritizing the path, then site, then counter.

Public Constructors

public constructor(path: Number, site: Number | String, counter: Number) source

Params:

NameTypeAttributeDescription
path Number

The part of the path in the tree.

site Number | String

The unique site identifier that created the triple.

counter Number

The local counter of the site when it created the triple.

Public Members

public c: * source

public p: * source

public s: * source

Public Methods

public compareTo(o: Triple): Number source

Compare two triples prioritizing the path, then site, then counter.

Params:

NameTypeAttributeDescription
o Triple

the other triple to compare .

Return:

Number

1 if this is lower than o, 1 if this is greater than o, 0 otherwise.