/*
 * SDK Pullenti Lingvo, version 4.33, fabruary 2026. Copyright (c) 2013-2026, Pullenti. All rights reserved. 
 * Non-Commercial Freeware and Commercial Software.
 * This class is generated using the converter Unisharping (www.unisharping.ru) from Pullenti C#.NET project. 
 * The latest version of the code is available on the site www.pullenti.ru
 */

const StringBuilder = require("./../unisharp/StringBuilder");

const SemFraglinkType = require("./SemFraglinkType");

/**
 * Связь между фрагментами
 */
class SemFraglink {
    
    constructor() {
        this.typ = SemFraglinkType.UNDEFINED;
        this.source = null;
        this.target = null;
        this.question = null;
    }
    
    toString() {
        let tmp = new StringBuilder();
        if (this.typ !== SemFraglinkType.UNDEFINED) 
            tmp.append(String(this.typ)).append(" ");
        if (this.question !== null) 
            tmp.append(this.question).append("? ");
        if (this.source !== null) 
            tmp.append(this.source.toString()).append(" ");
        if (this.target !== null) 
            tmp.append("-> ").append(this.target.toString());
        return tmp.toString();
    }
    
    static _new3859(_arg1, _arg2, _arg3, _arg4) {
        let res = new SemFraglink();
        res.typ = _arg1;
        res.source = _arg2;
        res.target = _arg3;
        res.question = _arg4;
        return res;
    }
}


module.exports = SemFraglink